import { EventEmitter } from 'events'; import { VoiceToTextOptions, SpeechRecognitionConfig, SpeechRecognitionResult, AudioInputConfig, EngineConfig, MicrophoneOptions, SpeechRecognitionEvents, BrowserSupport } from './types'; /** * Main VoiceToText converter class */ export declare class VoiceToText extends EventEmitter { private options; private currentEngine; private isInitialized; constructor(options?: VoiceToTextOptions); /** * Initialize the voice-to-text converter */ initialize(): Promise; /** * Convert speech from microphone to text */ fromMicrophone(options?: MicrophoneOptions): Promise; /** * Convert speech from audio file to text */ fromFile(file: File, config?: SpeechRecognitionConfig): Promise; /** * Convert speech from audio stream to text */ fromStream(stream: NodeJS.ReadableStream, config?: SpeechRecognitionConfig): Promise; /** * Start continuous speech recognition */ startListening(audioConfig: AudioInputConfig, config?: SpeechRecognitionConfig): Promise; /** * Stop speech recognition */ stopListening(): Promise; /** * Abort speech recognition */ abort(): Promise; /** * Check if currently listening/recording */ get isListening(): boolean; /** * Get current engine information */ getCurrentEngine(): { type: string; available: boolean; capabilities: any; } | null; /** * Switch to a different engine */ switchEngine(engineConfig: EngineConfig): Promise; /** * Get available engines in current environment */ static getAvailableEngines(): Array; /** * Check if a specific engine is available */ static isEngineAvailable(engineType: EngineConfig['engine']): boolean; /** * Get engine capabilities */ static getEngineCapabilities(engineType: EngineConfig['engine']): any; /** * Get browser support information */ static getBrowserSupport(): BrowserSupport; /** * Create a quick instance for one-time use */ static quickTranscribe(source: File | NodeJS.ReadableStream | 'microphone', options?: { engine?: EngineConfig['engine']; duration?: number; language?: string; config?: SpeechRecognitionConfig; }): Promise; /** * Clean up resources */ cleanup(): Promise; /** * Ensure the converter is initialized */ private ensureInitialized; /** * Select the best available engine */ private selectEngine; /** * Set up event forwarding from engine to main class */ private setupEngineEvents; /** * Handle engine fallback on error */ private handleEngineFallback; /** * Type-safe event emitter methods */ emit(event: K, ...args: Parameters): boolean; on(event: K, listener: SpeechRecognitionEvents[K]): this; once(event: K, listener: SpeechRecognitionEvents[K]): this; off(event: K, listener: SpeechRecognitionEvents[K]): this; } //# sourceMappingURL=voice-to-text.d.ts.map