John Factotum
5ba02c71c9
TTS: fix error & nodes getting skipped
...
Fixes #115
2026-04-09 05:22:49 +08:00
Huang Xin
27f8b57d05
Init view TTS with text segmentation granularity ( #47 )
...
in order to support more TTS backends
This PR also fixes a potential off-by-one error at the end boundary of the segment using `sentence` granularity.
2025-02-13 07:52:03 +00:00
John Factotum
83cce01797
Make text walker a separate module
2023-10-01 18:19:13 +08:00
John Factotum
ecefeb86e1
TTS: split document into ranges of block elements
2023-10-01 01:18:43 +08:00
John Factotum
fdec0b2037
TTS: add starting/resuming speaking from mark/range
...
Also:
- Fix `ssml:alphabet` attribute being ignored when set on root
- Convert `<br>` to `<break>`
2023-09-28 02:02:56 +08:00
John Factotum
403882e66d
Add TTS
...
Add function to convert current page to SSML, with `<mark>`s inserted
using `Intl.segmenter`.
The actual speaking is up to the reader, who should call
`hightlightSpeechMark()` upon mark events.
2023-09-27 02:18:40 +08:00