PDFiumPas 文件

TPdfReadingSession 类

单元: PDFium
不直接连接语音引擎的组件,用于协调朗读分块、播放状态和 TPdfView 级单词高亮

Syntax

type TPdfReadingSession = class(TComponent) ... end;

Members

Methods

Properties

Events

Description

The session never talks to a speech engine directly; the host handles OnSpeak, cancel, pause, and resume callbacks while the session tracks chunks and words

Load chunks with LoadSpoken, start with Play or PlayFrom, then call Tick as the engine reports busy or idle state

When the speech engine reports a spoken character offset, call FeedSpokenPosition so the attached TPdfView can highlight the current word

Remarks

Example

ReadingSession1.View := PdfView1;
ReadingSession1.LoadSpoken(Chunks);
ReadingSession1.Play;

See Also

TPdfSpokenText, BuildSpokenTextFromWords, TPdfView.TrackReadingWordAt