Expand description
Core TTS engine trait.
Traits§
- TtsEngine
- Trait that every TTS engine must implement.
Functions§
- estimate_
word_ boundaries - Estimate word boundaries using word-length-adjusted timing.
Mirrors Swift’s
WordTimingEstimator.estimate(text:wordsPerMinute:). - estimate_
word_ boundaries_ with_ wpm - Estimate word boundaries with configurable words per minute.
Matches Swift’s
WordTimingEstimator.estimate(text:wordsPerMinute:). - preprocess_
speech_ markdown - Convert speech markdown to SSML if detected, otherwise return text as-is. Returns (processed_text, is_ssml).
Type Aliases§
- OnAudio
Callback - Callback for streaming audio chunks.
- OnBoundary
Callback - Callback for word boundary events.
- OnEnd
Callback - Callback for speech-finished events.
- OnError
Callback - Callback for error events.
- OnStart
Callback - Callback for speech-started events.