import type { SherpaOnnxNamespace } from './wasmTypes';
export interface SherpaOnnxConfig {
    /** Base URL for WASM runtime files (JS glue + .wasm binary + feature modules).
     *  Must end with '/'. Can be a local path or remote URL (e.g. CDN, HuggingFace).
     *  If not set, auto-detects from the Expo bundle script tag or falls back to jsDelivr CDN. */
    wasmBasePath?: string;
    /** Set to false to disable Web Workers for inference (useful for debugging). Default: true. */
    useWorker?: boolean;
}
/** Configure global settings for @siteed/sherpa-onnx.rn.
 *  Call this before any WASM-dependent API (e.g. validateLibraryLoaded, ASR, TTS).
 *  @example
 *  configureSherpaOnnx({ wasmBasePath: '/my-local-wasm/' });
 */
export declare function configureSherpaOnnx(config: SherpaOnnxConfig): void;
export declare function getSherpaOnnxConfig(): Readonly<SherpaOnnxConfig>;
export interface WasmLoadProgressEvent {
    phase: 'wasm-binary' | 'runtime-init' | 'module' | 'ready';
    /** Only set when phase === 'module'. */
    module?: string;
    /** Number of modules loaded so far. */
    loaded: number;
    /** Total number of modules. */
    total: number;
}
export interface WasmLoadOptions {
    mainScriptUrl?: string;
    modulePaths?: string[];
    debug?: boolean;
    /** Called during WASM loading to report progress through each phase. */
    onProgress?: (event: WasmLoadProgressEvent) => void;
}
/** Detect the WASM base path from global config, Expo bundle script tag, or CDN. */
export declare function detectWasmBasePath(): string;
/**
 * Returns a promise that resolves when the WASM runtime is fully loaded.
 * Safe to call at any time — if WASM is already loaded, resolves immediately.
 * Use this in React components to await readiness without polling.
 *
 * @example
 * ```ts
 * const loaded = await waitForReady();
 * if (loaded) { // WASM is ready, show feature UI }
 * ```
 */
export declare function waitForReady(): Promise<boolean>;
/**
 * Legacy loader: sets window.sherpaOnnxModulePaths so sherpa-onnx-combined.js
 * loads only the requested feature modules. Called from main-sherpa-demo.ts.
 */
export declare const loadWasmModule: (options?: WasmLoadOptions) => Promise<boolean>;
export declare function loadScriptTag(url: string): Promise<void>;
/** Return true if the WASM runtime and all feature JS modules are ready. */
export declare function isSherpaOnnxReady(): boolean;
export declare function loadCombinedWasm(): Promise<void>;
/** Convenience accessor — only valid after loadCombinedWasm() resolves. */
export declare function getSherpaOnnx(): SherpaOnnxNamespace;
//# sourceMappingURL=wasmLoader.d.ts.map