import { SpeakOptions, SpeakerSettings } from './speech-model.js'; export declare class SpeechService { private _enabled; private _locale; private _speakers; private _voices; private _voicesLoading?; private _unlocked; private _listenersInstalled; private _pending?; private _queue; private _speaking; /** Utterances in flight — Chrome drops unreferenced ones mid-sentence. */ private _inFlight; /** Web Speech API available? (SSR/tests: false — every call becomes a no-op.) */ get isSupported(): boolean; /** At least one voice for the current locale is known. */ get isReady(): boolean; /** A user gesture has happened (or `unlock()` was called inside one). */ get isUnlocked(): boolean; get enabled(): boolean; /** Switching off stops whatever is being spoken. */ setEnabled(enabled: boolean): void; /** Language for voice selection ("de", "en-GB", …). */ setLocale(locale: string): void; /** Register or update a speaker; values are clamped to the supported ranges. */ configureSpeaker(id: string, settings: Partial): void; getSpeaker(id: string): SpeakerSettings | undefined; /** * Load the engine's voices: immediately if present, otherwise via * `voiceschanged` plus a short poll (Safari). Resolves with whatever is * known after at most a few seconds — never rejects. Also installs the * gesture unlock and the visibility handling. */ loadVoices(): Promise; get locale(): string; /** Known voices, filtered and ordered for the (given or current) locale. */ getVoices(locale?: string): SpeechSynthesisVoice[]; /** Every known voice, any language — for pickers that offer foreign voices on purpose. */ getAllVoices(): SpeechSynthesisVoice[]; /** * Speak text for a speaker. No-op when unsupported or disabled. Before the * first gesture the announcement is kept and spoken after the unlock if * it is still fresh (`SPEECH_PENDING_MAX_AGE_MS`). */ say(text: string, options?: SpeakOptions): void; /** Cancel current and queued speech. */ stop(): void; /** * Mark the engine usable — call inside a user gesture (e.g. the "test * voice" button); the first pointer/key gesture does it automatically. * Speaks an empty utterance so mobile Safari accepts later speech. */ unlock(): void; private _installListeners; private _enqueue; private _speakNext; } export declare const speechService: SpeechService; //# sourceMappingURL=SpeechService.d.ts.map