export interface VoiceNarrationConfig { /** Speech rate (0.1 to 10, default 1) */ rate: number; /** Pitch (0 to 2, default 1) */ pitch: number; /** Volume (0 to 1, default 0.8) */ volume: number; /** Preferred voice name (auto-detected by locale if omitted) */ voiceName?: string; /** BCP 47 locale (e.g. 'pl-PL', 'en-US') */ locale: string; /** Enable narration (default true) */ enabled: boolean; } export interface NarrationEvent { type: 'start' | 'end' | 'pause' | 'resume' | 'error' | 'boundary'; text?: string; charIndex?: number; error?: string; } export type NarrationCallback = (event: NarrationEvent) => void; export declare const DEFAULT_NARRATION_CONFIG: VoiceNarrationConfig; export declare class VoiceNarrator { private config; private synth; private currentUtterance; private listeners; private _speaking; private _paused; constructor(config?: Partial); /** Check if TTS is available in the browser. */ get available(): boolean; get speaking(): boolean; get paused(): boolean; /** Get available voices for the current locale. */ getVoices(): SpeechSynthesisVoice[]; /** Get all available voices. */ getAllVoices(): SpeechSynthesisVoice[]; /** Speak the given text. Stops any current speech first. */ speak(text: string, locale?: string): void; /** Speak a tutorial step — extracts localized text. */ speakStep(step: { title: string | Record; content: string | Record; }, locale?: string): void; /** Pause speech. */ pause(): void; /** Resume speech. */ resume(): void; /** Stop speech. */ stop(): void; /** Update configuration. */ setConfig(updates: Partial): void; /** Subscribe to narration events. */ on(callback: NarrationCallback): () => void; /** Dispose — stop speech and clear listeners. */ dispose(): void; private selectVoice; private stripMarkdown; private emit; } export declare function useVoiceNarration(config?: Partial): { speak: (text: string, locale?: string) => void; speakStep: (step: { title: string | Record; content: string | Record; }, locale?: string) => void; pause: () => void | undefined; resume: () => void | undefined; stop: () => void | undefined; speaking: boolean; paused: boolean; available: boolean; voices: SpeechSynthesisVoice[]; };