UNPKG

@lakshmiprasanth/react-voice-to-text

Version:

A modern React package for voice-to-text conversion with real-time speech recognition and file upload support

24 lines 987 B
import { SpeechRecognitionConfig, SpeechRecognitionResult, VoiceToTextOptions, BrowserSupport } from '../types'; interface UseVoiceToTextOptions extends VoiceToTextOptions { onResult?: (result: SpeechRecognitionResult) => void; onError?: (error: string) => void; onStart?: () => void; onStop?: () => void; } interface UseVoiceToTextReturn { isInitialized: boolean; isRecording: boolean; isProcessing: boolean; results: SpeechRecognitionResult[]; error: string | null; browserSupport: BrowserSupport | null; startRecording: (options?: Partial<SpeechRecognitionConfig>) => Promise<void>; stopRecording: () => Promise<void>; clearResults: () => void; clearError: () => void; updateConfig: (config: Partial<VoiceToTextOptions>) => void; getConfig: () => VoiceToTextOptions; } export declare const useVoiceToText: (options?: UseVoiceToTextOptions) => UseVoiceToTextReturn; export {}; //# sourceMappingURL=useVoiceToText.d.ts.map