import { Ref, ShallowRef } from 'vue'; import { TTSProvider, SpeakOptions, VoiceInfo, SpeechError } from '../providers/types.js'; export interface UseSpeechSynthesisOptions { /** Override the injected provider for this composable instance only */ provider?: TTSProvider; /** Initial speech rate (0.1–10, default 1) */ rate?: number; /** Initial pitch (0–2, default 1) */ pitch?: number; /** Initial volume (0–1, default 1) */ volume?: number; } export interface UseSpeechSynthesisReturn { /** Whether the provider is available in this environment */ readonly isSupported: Readonly>; /** Whether speech is currently playing */ readonly isSpeaking: Readonly>; /** Whether speech is paused */ readonly isPaused: Readonly>; /** Voices available from the provider (loads async for AI providers) */ readonly voices: Readonly>; /** True while voices are being fetched */ readonly isLoadingVoices: Readonly>; /** Currently selected voice */ readonly selectedVoice: Ref; /** * Speech rate — changes apply to the **next** `speak()` call. * (I-4.4: rate/pitch changes do NOT affect the current utterance) */ readonly rate: Ref; /** Pitch — changes apply to the **next** `speak()` call (I-4.4) */ readonly pitch: Ref; /** Volume — changes apply to the **next** `speak()` call */ readonly volume: Ref; /** Most recent error, cleared on next `speak()` */ readonly error: Readonly>; /** Speak text. Uses current `selectedVoice`, `rate`, `pitch`, `volume` */ speak(text: string, overrides?: Partial): Promise; /** Stop the current utterance immediately */ stop(): void; /** Pause (Web Speech only; no-op for AI providers) */ pause(): void; /** Resume (Web Speech only; no-op for AI providers) */ resume(): void; /** Reload the voice list */ loadVoices(): Promise; } export declare function useSpeechSynthesis(options?: UseSpeechSynthesisOptions): UseSpeechSynthesisReturn;