/** * STT adapter factory with type guards * * Uses discriminated unions and lazy loading following SDK patterns. */ import type { GetSTTOptions, STTAdapter } from './types.js'; /** * Create an STT adapter * * Uses lazy loading to only import the requested adapter. * * @example * ```ts * // Browser Speech API (default) * const stt = await getSTT(); * * // Explicit Browser Speech * const stt = await getSTT({ type: 'browser-speech' }); * * // Whisper.cpp (recommended for accuracy) * const stt = await getSTT({ type: 'whisper-cpp', model: 'tiny.en' }); * * // Whisper WASM (transformers.js - has known issues) * const stt = await getSTT({ type: 'whisper-wasm', modelSize: 'tiny' }); * ``` */ export declare function getSTT(options?: GetSTTOptions): Promise; /** * Auto-detect and create the best available STT adapter * * Selection priority: * 1. Whisper WASM if WebGPU is available (best accuracy) * 2. Browser Speech API if available (no download) * 3. Whisper WASM as fallback * * @throws {CapabilityNotAvailableError} If no STT adapter is available * * @example * ```ts * const stt = await getSTTAuto(); * console.log(`Using ${stt.type} adapter`); * ``` */ export declare function getSTTAuto(options?: Partial>): Promise; /** * Check if a specific STT backend is available */ export declare function isSTTAvailable(type: 'browser-speech' | 'whisper-wasm'): boolean; //# sourceMappingURL=factory.d.ts.map