A simple command-line interface for KittenTTS - a lightweight text-to-speech library.
uv sync
uv run kittentts "Your text here"Install as a system-wide tool (without GPU dependencies):
uv tool install --overrides skip-gpu.txt .
kittentts "Your text here"| Option | Default | Description |
|---|---|---|
text |
Text to convert (reads from stdin if not provided) | |
--model |
mini | Model to use (mini, micro, nano, nano-int8) |
--voice |
Bruno | Voice to use |
--speed |
1.0 | Speech speed multiplier |
--output |
audio.wav | Output file path (- for stdout) |
--mp3 |
Output as MP3 (replaces .wav with .mp3 or appends .mp3) | |
--list-voices |
List available voices and exit | |
--normalize |
Convert numbers, currencies, abbreviations, etc. to readable text |
| Model | Parameters | Size |
|---|---|---|
| mini | 80M | 80 MB |
| micro | 40M | 41 MB |
| nano | 15M | 56 MB |
| nano-int8 | 15M | 25 MB |
Voice names vary by model. Use --list-voices to see available voices for the selected model.
# Basic usage
uv run kittentts "Hello, world!"
# Use a different voice (use --list-voices to see options)
uv run kittentts --voice Kiki "Hello, world!"
# Use a smaller/faster model
uv run kittentts --model nano "Hello, world!"
# Adjust speed (faster)
uv run kittentts --speed 1.5 "Hello, world!"
# Read from stdin
echo "Hello from stdin" | uv run kittentts
cat input.txt | uv run kittentts
# Pipe audio to stdout
uv run kittentts --output - "Hello" | play -
# Both stdin and stdout
echo "hey" | uv run kittentts --output - | aplay
# Output as MP3
uv run kittentts --mp3 "Hello, world!" # Creates audio.mp3
uv run kittentts --mp3 --output custom "Hello" # Creates custom.mp3
uv run kittentts --mp3 --output custom.wav "Hello" # Creates custom.mp3
# List available voices
uv run kittentts --list-voices
# Convert numbers, currencies, abbreviations, etc. to readable text
uv run kittentts --normalize "I have $100 and 2 cats"- Python 3.12+
- KittenTTS
- soundfile
- ffmpeg (only required for
--mp3option)
Models are cached in ~/.cache/huggingface/hub/ after first download. Subsequent runs use the cached version.
MIT License - see LICENSE file for details.