/** * ONNX - Public facade for `@runanywhere/web-onnx`. * * Loads `racommons-onnx-sherpa.{js,wasm}` (the dedicated ONNX/Sherpa * Emscripten module) and registers the ONNX runtime + Sherpa speech * vtables with the C++ plugin registry. After `ONNX.register()` resolves, * STT/TTS/VAD operations flow entirely through the proto-byte adapters * in `@runanywhere/web` core into that WASM module. * * Usage: * ```ts * import { RunAnywhere } from '@runanywhere/web'; * import { ONNX } from '@runanywhere/web-onnx'; * * await RunAnywhere.initialize(); * await ONNX.register(); * const vad = await RunAnywhere.detectVoiceActivity(silence); * ``` */ import { type BackendRegistrationState } from '@runanywhere/web/backend'; import { type ONNXBackendStatus } from './ONNXStatus.js'; export interface ONNXRegisterOptions { /** Override URL to the `racommons-onnx-sherpa.js` glue file. */ wasmUrl?: string; } export declare const ONNX: { readonly moduleId: string; /** `true` when the ONNX/Sherpa plugin registration succeeded. */ readonly isRegistered: boolean; /** Typed registration lifecycle for UI and diagnostics. */ readonly registrationState: BackendRegistrationState; /** Current STT/TTS/VAD export availability for this backend package. */ status(): ONNXBackendStatus; /** * Register the ONNX Runtime + Sherpa speech backends. * * Loads the dedicated `racommons-onnx-sherpa.{js,wasm}` artifact, calls * `rac_init()`, registers the ONNX runtime and Sherpa speech vtables, * then installs the module on every core proto-byte adapter so * STT/TTS/VAD calls in `@runanywhere/web` core route through it. */ register(options?: ONNXRegisterOptions): Promise; /** Unregister the proto-byte plugins and release the WASM module. */ unregister(): void; }; /** Best-effort registration helper for apps that import the package eagerly. */ export declare function autoRegister(options?: ONNXRegisterOptions): Promise; //# sourceMappingURL=ONNX.d.ts.map