@lakshmiprasanth/react-voice-to-text
Version:
A modern React package for voice-to-text conversion with real-time speech recognition and file upload support
34 lines • 1.05 kB
TypeScript
interface UseSpeechRecognitionOptions {
language?: string;
continuous?: boolean;
interimResults?: boolean;
maxAlternatives?: number;
onResult?: (event: any) => void;
onError?: (event: any) => void;
onStart?: () => void;
onEnd?: () => void;
onAudioStart?: () => void;
onAudioEnd?: () => void;
onSoundStart?: () => void;
onSoundEnd?: () => void;
onSpeechStart?: () => void;
onSpeechEnd?: () => void;
onNoMatch?: () => void;
onNomatch?: () => void;
}
interface UseSpeechRecognitionReturn {
isSupported: boolean;
isListening: boolean;
transcript: string;
finalTranscript: string;
interimTranscript: string;
error: string | null;
start: () => void;
stop: () => void;
abort: () => void;
reset: () => void;
updateConfig: (config: Partial<UseSpeechRecognitionOptions>) => void;
}
export declare const useSpeechRecognition: (options?: UseSpeechRecognitionOptions) => UseSpeechRecognitionReturn;
export {};
//# sourceMappingURL=useSpeechRecognition.d.ts.map