/** * VoiceManager - Handles text-to-speech and speech-to-text operations * * Wraps react-native-tts and @react-native-voice/voice to provide a unified * interface for voice interactions with queuing and error handling. */ export declare class VoiceManager { private isSpeaking; private isListeningActive; private speechQueue; private currentListenResolve; private currentListenReject; private isInitialized; private ttsAvailable; private sttAvailable; constructor(); /** * Initialize TTS and STT engines */ private initialize; /** * Initialize Text-to-Speech */ private initializeTTS; /** * Initialize Speech-to-Text */ private initializeSTT; /** * Speak text using TTS with queuing * * @param text - Text to speak * @returns Promise that resolves when speech completes */ speak(text: string): Promise; /** * Ask a question by speaking it and then listening for response * * @param question - Question to ask * @returns Promise that resolves with the user's spoken response */ ask(question: string): Promise; /** * Start listening for speech input * * @returns Promise that resolves with recognized text */ startListening(): Promise; /** * Stop listening for speech input */ stopListening(): Promise; /** * Check if voice capabilities are available * * @returns Object indicating TTS and STT availability */ isAvailable(): { tts: boolean; stt: boolean; both: boolean; }; /** * Get current voice state */ getState(): { isSpeaking: boolean; isListening: boolean; }; /** * Stop all voice operations and clear queue */ stopAll(): Promise; /** * Set TTS language * * @param language - Language code (e.g., 'en-US', 'es-ES') */ setLanguage(language: string): Promise; /** * Set TTS speech rate * * @param rate - Speech rate (0.0 to 1.0, default 0.5) */ setRate(rate: number): Promise; /** * Set TTS pitch * * @param pitch - Voice pitch (0.5 to 2.0, default 1.0) */ setPitch(pitch: number): Promise; /** * Clean up resources */ destroy(): Promise; /** * Process next item in speech queue */ private processNextInQueue; } /** * Get singleton VoiceManager instance */ export declare function getVoiceManager(): VoiceManager; /** * Destroy singleton instance */ export declare function destroyVoiceManager(): Promise; //# sourceMappingURL=VoiceManager.d.ts.map