Local text-to-speech CLI using the Kokoro-82M model via kokoro-onnx. No cloud API required.
- Python 3.13+
- uv
Clone the repo and install dependencies:
git clone https://github.com/adrianrivers/terminal-tts.git
cd terminal-tts
uv syncDownload the model files (~337 MB total) into the project root:
curl -LO https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.onnx
curl -LO https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.binuv run python say.py "Your text here"Options:
| Flag | Description |
|---|---|
-v VOICE |
Voice ID (default: af_sarah) |
-i |
Interactively select a voice from a menu |
-o FILE |
Output WAV filename (default: output.wav) |
-l LANG |
Language code, e.g. en-gb (default: en-us) |
Examples:
# Default voice
uv run python say.py "Hello world"
# Specific voice
uv run python say.py -v af_bella "Hello world"
# Interactive voice picker
uv run python say.py -i "Hello world"
# Custom output file
uv run python say.py -o hello.wav "Hello world"
# British English voice
uv run python say.py -v bm_lewis -l en-gb "Hello world"Apache-2.0