import { ReadiumSpeechPlaybackEngine } from '../engine'; import { ReadiumSpeechPlaybackEvent, ReadiumSpeechPlaybackState } from '../navigator'; import { ReadiumSpeechUtterance } from '../utterance'; import { ReadiumSpeechVoice } from '../voices/types'; export declare class WebSpeechEngine implements ReadiumSpeechPlaybackEngine { private speechSynthesis; private speechSynthesisUtterance; private currentVoice; private currentUtterances; private currentUtteranceIndex; private playbackState; private readonly events; private voiceManager; private voices; private defaultVoice; private speakInContentLanguage; private languageVoiceCache; private warmingLanguages; private speakGeneration; private resumeInfinityTimer?; private isSpeakingInternal; private restartPending; private isPausedInternal; private isAndroidPaused; private pausedAtUtteranceIndex; private initialized; private maxLengthExceeded; private utterancesBeingCancelled; private rate; private pitch; private volume; private features; private patches; constructor(); private shouldUseResumeInfinity; private createUtterance; initialize(options?: { languages?: string[]; maxTimeout?: number; interval?: number; maxLengthExceeded?: "error" | "none" | "warn"; }): Promise; private validateText; private getCurrentVoiceForUtterance; private voiceMatchesLanguage; private voiceForUtteranceSync; private voiceForUtterance; private warmLanguageVoiceCache; getCurrentVoice(): ReadiumSpeechVoice | null; setSpeakInContentLanguage(enabled: boolean): void; getSpeakInContentLanguage(): boolean; private toPlainText; loadUtterances(contents: ReadiumSpeechUtterance[], startIndex?: number): void; setVoice(voice: ReadiumSpeechVoice | string): Promise; getAvailableVoices(): Promise; speak(utteranceIndex?: number): void; private cancelCurrentSpeech; private speakCurrentUtterance; private startResumeInfinity; private stopResumeInfinity; pause(): void; resume(): void; stop(): void; setRate(rate: number): void; getRate(): number; setPitch(pitch: number): void; getPitch(): number; setVolume(volume: number): void; getVolume(): number; private scheduleRestartIfSpeaking; getState(): ReadiumSpeechPlaybackState; getCurrentUtteranceIndex(): number; setCurrentUtteranceIndex(index: number, onComplete?: (success: boolean) => void): void; getUtteranceCount(): number; on(event: ReadiumSpeechPlaybackEvent["type"], callback: (event: ReadiumSpeechPlaybackEvent) => void): () => void; private emitEvent; private setState; destroy(): Promise; }