Skip to main content

Module engine

Module engine 

Source
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§

OnAudioCallback
Callback for streaming audio chunks.
OnBoundaryCallback
Callback for word boundary events.
OnEndCallback
Callback for speech-finished events.
OnErrorCallback
Callback for error events.
OnStartCallback
Callback for speech-started events.