an.audio.mac_say_tts#
MacSayTTS — audible offline speech via macOS’s built-in say command.
Free, local, no API keys, no Python deps. macOS-only. The say binary
ships with every macOS install since at least 10.4. Voices are listed
by say -v '?' and can be passed as voice_id; common defaults:
"Samantha", "Daniel", "Karen", "Alex".
Output is 16-bit little-endian PCM WAV at 22050 Hz so the rest of the audio pipeline (which prefers WAV) can read frames + duration directly.
>>> tts = MacSayTTS()
>>> tts.name
'mac_say'
Classes
|
macOS |
Exceptions
Raised when the |
- class an.audio.mac_say_tts.MacSayTTS(*, default_voice_id='Samantha', sample_rate=22050, rate_wpm=None)[source]#
Bases:
objectmacOS
say-backed TTSProvider.Implements the
TTSProviderprotocol. Audible, deterministic, and fully offline — uses Apple’s voice synthesis bundled with the OS.- repeatable: bool = True#
The same request gives the same audio, so best-of-N takes never apply (
an.audio.takes.voice_takes()) and nothing is billed.
- exception an.audio.mac_say_tts.MacSayTTSError[source]#
Bases:
RuntimeErrorRaised when the
saysubprocess fails.