Get up and running in 5 minutes!
# Clone or download the project
cd kitten-tts
# Start with Docker Compose
docker-compose up -d
# Access WebUI
open http://localhost:8000That's it! 🎉
# Install dependencies
pip install -r requirements.txt
# Install KittenTTS
pip install https://github.com/KittenML/KittenTTS/releases/download/0.8/kittentts-0.8.0-py3-none-any.whl
# Run server
python app.py
# Access WebUI
open http://localhost:8000- Open http://localhost:8000
- Enter your text
- Select a voice
- Click "Generate Speech"
- Listen or download!
# Generate speech
curl http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "kitten-tts-mini-0.8",
"input": "Hello world!",
"voice": "Jasper",
"response_format": "mp3"
}' \
--output hello.mp3
# Play it
afplay hello.mp3 # macOS
xdg-open hello.mp3 # Linux
start hello.mp3 # Windowsimport requests
response = requests.post(
"http://localhost:8000/v1/audio/speech",
json={
"model": "kitten-tts-mini-0.8",
"input": "Hello world!",
"voice": "Jasper",
"response_format": "mp3"
}
)
with open("hello.mp3", "wb") as f:
f.write(response.content)const response = await fetch('http://localhost:8000/v1/audio/speech', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
model: 'kitten-tts-mini-0.8',
input: 'Hello world!',
voice: 'Jasper',
response_format: 'mp3'
})
});
const blob = await response.blob();
const audio = new Audio(URL.createObjectURL(blob));
audio.play();| Voice | Description |
|---|---|
| Bella | Female, warm |
| Jasper | Male, clear |
| Luna | Female, soft |
| Bruno | Male, deep |
| Rosie | Female, friendly |
| Hugo | Male, professional |
| Kiki | Female, energetic |
| Leo | Male, casual |
# Create .env file
echo "API_KEY=your-secret-key" > .env
# Restart with authentication
docker-compose down
docker-compose -f docker-compose.api-key.yml up -d
# Use API key in requests
curl http://localhost:8000/v1/audio/speech \
-H "Authorization: Bearer your-secret-key" \
...# Docker
docker-compose down
# Python
# Press Ctrl+C# Health check
curl http://localhost:8000/health
# View logs
docker-compose logs -f- 📖 Read the full README.md
- 💻 Try the examples
- 🐳 Learn to publish Docker images
- 🔧 Customize configuration in
.env
Server won't start?
docker-compose logsModel download fails?
- Check internet connection
- First run downloads ~79MB model
Port already in use?
# Change port in .env
PORT=8001Need help?
Enjoy! 🐱🎵