Skip to content

v0.1.0

Choose a tag to compare

@richardr1126 richardr1126 released this 22 Feb 02:57

πŸš€ KittenTTS FastAPI v0.1.0

  • 🧠 Turns KittenTTS into a real deployable API service
  • ⚑ Keeps the lightweight model footprint while adding production ergonomics
  • πŸ“š Handles long-form input (chunking + merged output) for audiobook-style workflows
  • 🐳 Ships with Docker-first deployment and clean local dev setup

πŸ”₯ What You Get

  • 🌐 FastAPI backend with /v1/audio/speech and /v1/audio/voices
  • πŸ–₯️ Built-in web UI for text input, voice controls, playback, and download
  • πŸš„ ONNX Runtime acceleration with auto / cpu / cuda
  • βš™οΈ Environment-driven configuration via KITTEN_*
  • 🧩 OpenAI-compatible API behavior for easier drop-in integration

🐳 Quick Start

CPU Docker:

docker run -it -d \
  --name kittentts-fastapi \
  --restart unless-stopped \
  -e KITTEN_MODEL_REPO_ID="KittenML/kitten-tts-nano-0.8-fp32" \
  -p 8005:8005 \
  ghcr.io/richardr1126/kittentts-fastapi-cpu

Local development:

cp .env.example .env
uv sync
uv run src/server.py

NVIDIA local setup:

uv sync --group nvidia

Then set KITTEN_TTS_DEVICE=cuda before startup.

πŸ§ͺ API Example

curl http://localhost:8005/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kitten-tts",
    "input": "Hello from the Kitten TTS FastAPI server!",
    "voice": "Jasper",
    "speed": 1.1,
    "response_format": "mp3"
  }' \
  --output speech.mp3

List voices:

curl http://localhost:8005/v1/audio/voices

🌍 Open Source

  • πŸ“„ License: Apache-2.0
  • 🐱 Upstream model: KittenML/KittenTTS
  • 🀝 Contributions, bug reports, and production feedback are welcome

πŸ™Œ Credits

  • KittenTTS by KittenML
  • Early server foundation inspired by devnen/Kitten-TTS-Server

πŸ”— Links