agent-tts
Guides

Use a cloud voice

Use ElevenLabs, OpenAI, or Azure instead of the OS speech engine.

Run the setup wizard in a terminal. It asks which provider to use (or Off to disable cloud) and which environment variable holds the API key — any name, not just the vendor default.

tts setup
# same as: tts cloud setup

Keys: space selects the radio, enter saves, ↑/↓ move. Go back and Exit sit at the bottom of every list.

The wizard never writes the secret into config.json. It stores the env var name in cloud.api_key_env.

Non-interactive equivalent, including a custom key name:

tts backend cloud
tts cloud provider openai
tts cloud env OPEN_AI_ALLOY_VOICE_KEY

Each utterance is synthesized over HTTPS and played locally (afplay on macOS; ffplay / mpg123 / aplay / paplay on Linux; PowerShell media APIs on Windows).

ProviderproviderVoice id exampleDefault env var
ElevenLabselevenlabs21m00Tcm4TlvDq8ikWAM (Rachel)ELEVENLABS_API_KEY
OpenAIopenaialloy, nova, …OPENAI_API_KEY
Azureazureen-US-JennyNeuralAZURE_SPEECH_KEY plus tts cloud region
Offtts backend autoOS voice—

tts voices lists ElevenLabs voices when a key is set. OpenAI tts wpm maps to the API speed parameter.

Prefer tts cloud env YOUR_VAR_NAME over tts cloud key so the secret never lands in config.json. A missing key or failed request stays silent for that turn - check ~/.agent-tts/debug.log. Slash-command /tts setup is not interactive; run the tts binary in a terminal.

On macOS, quality of the local backend comes from voices in System Settings → Accessibility → Spoken Content. Siri voices are not selectable by name through say. Leave prose_voice null and set the system voice to try that path.

Cloud requests that fail TLS (CERTIFICATE_VERIFY_FAILED) stay silent. python.org macOS Pythons need a CA bundle — see Troubleshooting.

See also

On this page