import { GuidedNavigationObject } from '@readium/shared'; import { ReadiumSpeechUtterance } from '../utterance.js'; import { ExtractUtterancesOptions } from './types.js'; import { SourceTrace } from './walkContext.js'; export type { SourceTrace } from './walkContext.js'; /** * Extracts an ordered list of read-aloud utterances from a Guided * Navigation node tree, following the patterns documented at * https://github.com/readium/guided-navigation/tree/main/examples/read-aloud. * * Accepts `GuidedNavigationObject[]` (as returned by `parseMarkup()`, or `GuidedNavigationDocument.guided`) * rather than a wrapped document. */ export declare function extractUtterances(nodes: GuidedNavigationObject[], options?: ExtractUtterancesOptions): Promise; /** * Same as `extractUtterances()`, plus `sources[i]`: the node that produced `utterances[i]`, * and `blockStarts[i]`: whether `utterances[i]` begins a new block-level element. */ export declare function extractUtterancesWithSources(nodes: GuidedNavigationObject[], options?: ExtractUtterancesOptions): Promise<{ utterances: ReadiumSpeechUtterance[]; sources: SourceTrace; blockStarts: boolean[]; }>;