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

MacSayTTS(*[, default_voice_id, ...])

macOS say-backed TTSProvider.

Exceptions

MacSayTTSError

Raised when the say subprocess fails.

class an.audio.mac_say_tts.MacSayTTS(*, default_voice_id='Samantha', sample_rate=22050, rate_wpm=None)[source]#

Bases: object

macOS say-backed TTSProvider.

Implements the TTSProvider protocol. Audible, deterministic, and fully offline — uses Apple’s voice synthesis bundled with the OS.

billed: bool = False#

an#311).

Type:

Costs nothing per request (stated, never inferred

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: RuntimeError

Raised when the say subprocess fails.