Quick start
Building into application code instead? Use the Python or TypeScript SDK. For AI agents, see MCP.
Installation
- pip
- with streaming
[stream] extra enables real-time playback to your system speakers via --stream.
Authenticate
- Environment variable
- Config file
Set defaults to type less
Set defaults to type less
Save defaults once and omit the matching flags on every call:
| Config key | Used when omitted | Default |
|---|---|---|
api_key | always | — |
default_voice | --voice not passed | — |
default_model | --model not passed | sona_speech_2 |
default_lang | --lang not passed | ko |
Synthesize speech
Manage voices
Predict duration & track usage
tts-predict estimates duration and credit cost without spending credits — handy before a large batch.
Recipes
Narrate a folder of scripts
Narrate a folder of scripts
Drop your
.txt files in one directory and synthesize them all at once:Speak an LLM's output live
Speak an LLM's output live
Pipe any command’s text straight into real-time speech:
Find your custom voices with jq
Find your custom voices with jq
--format json makes any read command scriptable:Estimate cost before a batch
Estimate cost before a batch
Loop over inputs and sum predicted durations before spending credits:
Reference
Supported models
Supported models
sona_speech_1, sona_speech_2, sona_speech_2_flash, sona_speech_2t, supertonic_api_1, supertonic_api_3. See Models for capabilities and trade-offs.Exit codes
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | API error |
2 | Authentication error |
3 | Input validation error |
130 | Interrupted (Ctrl-C) |
Troubleshooting
command not found: supertone
command not found: supertone
The install directory isn’t on your
PATH, or you installed inside a virtual environment that isn’t active. Re-activate the venv, or reinstall with pip install --user supertone-cli and ensure the user scripts directory is on your PATH.Authentication error (exit code 2)
Authentication error (exit code 2)
Your API key is missing or invalid. Check
echo $SUPERTONE_API_KEY, or run supertone config set api_key your-api-key. Get a key from the Developer Console.--stream produces no audio
--stream produces no audio
Real-time playback requires the streaming extra (
pip install "supertone-cli[stream]") and the sona_speech_1 model — pass -m sona_speech_1. Other models return “Streaming requires sona_speech_1”; to use them, save to a file with -o output.wav instead.Out of credits (402)
Out of credits (402)
Synthesis stops when your balance runs out. Check it with
supertone usage balance and top up in the Developer Console.Related
MCP
Let AI agents call Supertone through the Model Context Protocol.
Python SDK
The same API for application code.