dpo_reader.tts.base¶
Base TTS backend interface.
Functions
|
Apply pronunciation fixes to text before TTS. |
|
Split text into chunks suitable for TTS. |
Classes
Abstract base class for TTS backends. |
|
High-level TTS generator with caching and progress tracking. |
- dpo_reader.tts.base.split_into_chunks(text, max_chars=250)[source]¶
Split text into chunks suitable for TTS.
- class dpo_reader.tts.base.TTSBackend[source]¶
Bases:
ABCAbstract base class for TTS backends.
- class dpo_reader.tts.base.TTSGenerator[source]¶
Bases:
objectHigh-level TTS generator with caching and progress tracking.
- __init__(backend, voice_assignment, cache_dir=None, include_attribution=True, pause_between_posts=1.5, narrator_voice=None)[source]¶
- Parameters:
backend (TTSBackend)
voice_assignment (VoiceAssignment)
cache_dir (Path | None)
include_attribution (bool)
pause_between_posts (float)
narrator_voice (str | None)
- generate_post(post)[source]¶
Generate audio for a post, using cache if available.
Uses narrator voice for attribution (“Author says:”) and the author’s assigned voice for actual content.