synthesize
Synthesizes narration text to audio with word-level timing events.Plain text to synthesize
Path to TTS bundle directory for caching. If provided and a cache hit occurs, returns cached audio immediately.
Event channel for streaming word boundaries and audio data
Emits events via channel:
WordBoundary: Fired for each wordAudioReady: Fired once when synthesis completes
TTSEvent
Discriminated union:export_audio
Pre-generates and caches audio for multiple text blocks.Array of text blocks to synthesize
Path to bundle directory for writing cache
Number of newly generated audio files (cache misses)
ensure_tts_ready
Ensures TTS models are downloaded and ready. Performs a warmup synthesis if models need initialization.One of:
'ready': Models already present'downloaded': Models downloaded and initialized
This command is called automatically by the app on startup. You typically don’t need to invoke it manually.