Abstract base classes and data types for text-to-speech backends.
TTSBackend
Bases: ABC
Abstract base class for text-to-speech backends.
available_voices()
abstractmethod
Return list of available voice IDs.
health()
abstractmethod
Check if the backend is ready.
synthesize(text, *, voice_id='', speed=1.0, output_format='mp3')
abstractmethod
Synthesize text to audio.
TTSResult
dataclass
Result of a text-to-speech synthesis.
save(path)
Write audio bytes to a file and return the path.