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 setupKeys: 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_KEYEach utterance is synthesized over HTTPS and played locally (afplay on macOS; ffplay / mpg123 / aplay / paplay on Linux; PowerShell media APIs on Windows).
| Provider | provider | Voice id example | Default env var |
|---|---|---|---|
| ElevenLabs | elevenlabs | 21m00Tcm4TlvDq8ikWAM (Rachel) | ELEVENLABS_API_KEY |
| OpenAI | openai | alloy, nova, … | OPENAI_API_KEY |
| Azure | azure | en-US-JennyNeural | AZURE_SPEECH_KEY plus tts cloud region |
| Off | tts backend auto | OS 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.