import { ReadiumSpeechPlaybackEngine } from './engine'; import { GndObject } from './gnd/types'; import { ReadiumSpeechNavigatorContract, ReadiumSpeechPlaybackEvent, ReadiumSpeechPlaybackState } from './navigator'; import { ISpeechDefaults } from './preferences/SpeechDefaults'; import { ISpeechPreferences, SpeechPreferences } from './preferences/SpeechPreferences'; import { SpeechPreferencesEditor } from './preferences/SpeechPreferencesEditor'; import { SpeechSettings } from './preferences/SpeechSettings'; import { ContextualizationShapeOverrides } from './preferences/verbosityTables'; import { ReadiumSpeechUtterance } from './utterance'; import { Contextualizations } from './utterances/types'; import { SentenceSegmenter } from './utterances/sentenceSegmenter'; import { ReadiumSpeechVoice } from './voices/types'; export interface ContextualizationOverrides { contextualizations?: Contextualizations; shapes?: ContextualizationShapeOverrides; params?: (role: string, node: GndObject) => Record | undefined; } export interface SegmentationOverrides { suppressions?: Record; segmenter?: SentenceSegmenter; } export interface ReadiumSpeechNavigatorConfiguration { preferences?: ISpeechPreferences; defaults?: ISpeechDefaults; contextualizationOverrides?: ContextualizationOverrides; segmentationOverrides?: SegmentationOverrides; } export declare class ReadiumSpeechNavigator implements ReadiumSpeechNavigatorContract { private engine; private contentQueue; private readonly events; private navigatorState; private pendingAdvanceTimeout; private _defaults; private _preferences; private _settings; private _preferencesEditor; private readonly contextualizationOverrides?; private readonly segmentationOverrides?; private source; private contentSources; private contentBlockStarts; private pendingResumeIndex; private pendingResumeState; private pendingAutoPauseIndex; constructor(engine: ReadiumSpeechPlaybackEngine, configuration?: ReadiumSpeechNavigatorConfiguration); private applyEngineParameters; private initializeEngine; private setupEngineListeners; private setNavigatorState; getVoices(): Promise; setVoice(voice: ReadiumSpeechVoice | string): void; getCurrentVoice(): ReadiumSpeechVoice | null; setSpeakInContentLanguage(enabled: boolean): void; getSpeakInContentLanguage(): boolean; loadContent(content: ReadiumSpeechUtterance | ReadiumSpeechUtterance[]): void; loadGndContent(nodes: GndObject[]): Promise; private setContentQueue; private reextract; private resolveResumeIndex; getCurrentContent(): ReadiumSpeechUtterance | null; getContentQueue(): ReadiumSpeechUtterance[]; private getCurrentUtteranceIndex; play(): void; pause(): void; stop(): void; private clearPendingAdvance; private skipToPosition; next(forcePlay?: boolean): boolean; previous(forcePlay?: boolean): boolean; jumpTo(utteranceIndex: number, forcePlay?: boolean): boolean; getState(): ReadiumSpeechPlaybackState; on(event: ReadiumSpeechPlaybackEvent["type"] | "contentchange", listener: (event: ReadiumSpeechPlaybackEvent) => void): () => void; private emitEvent; private emitUtteranceBoundary; private emitContentChangeEvent; get settings(): SpeechSettings; get preferencesEditor(): SpeechPreferencesEditor; submitPreferences(preferences: SpeechPreferences): Promise; private applyPreferences; private sameSettingValue; destroy(): Promise; }