@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
19 lines • 795 B
TypeScript
export interface UseSpeechRecognitionOptions {
lang?: string;
onFinalTranscript: (text: string) => void;
onInterimTranscript?: (text: string) => void;
}
export interface SpeechRecognitionHook {
isSupported: boolean;
isListening: boolean;
start(): void;
stop(): void;
}
/**
* Tiny wrapper around the Web Speech API. `start()` opens the mic and
* streams interim transcripts via `onInterimTranscript`; on a finalized
* chunk it fires `onFinalTranscript`. `isSupported` is false where the
* API is missing (e.g. Firefox) — callers should hide the mic button.
*/
export declare function useSpeechRecognition({ lang, onFinalTranscript, onInterimTranscript, }: UseSpeechRecognitionOptions): SpeechRecognitionHook;
//# sourceMappingURL=use-speech-recognition.d.ts.map