/** * Hook for Speech-to-Text functionality */ import type { GetSTTOptions, STTOptions } from '../browser-ai/index.js'; /** * Options for useSTT hook */ export interface UseSTTOptions { /** Auto-initialize on mount */ autoInit?: boolean; /** Default STT options */ defaultOptions?: STTOptions; } /** * Return type for useSTT hook */ export interface UseSTTReturn { /** Start listening */ start: (options?: STTOptions) => Promise; /** Stop listening */ stop: () => Promise; /** Initialize the adapter (called automatically if autoInit) */ initialize: (options?: GetSTTOptions) => Promise; /** Current state (reactive) */ readonly isListening: boolean; readonly isReady: boolean; readonly isInitializing: boolean; /** Final transcribed text (updates on speech completion) */ readonly lastResult: string; /** Interim transcribed text (updates live during speech) */ readonly interimResult: string; /** Current result - interim while listening, last result otherwise */ readonly currentResult: string; readonly error: Error | null; readonly downloadProgress: number; /** Current adapter type (e.g., 'browser', 'whisper-wasm', 'whisper-cpp') */ readonly adapterType: string | null; } /** * Hook for Speech-to-Text * * @example * ```svelte * * * * * {#if stt.lastResult} *

You said: {stt.lastResult}

* {/if} * ``` */ export declare function useSTT(options?: UseSTTOptions): UseSTTReturn; //# sourceMappingURL=useSTT.svelte.d.ts.map