Skip to main content

Python SDK

The Python SDK is the reference KittenTTS runtime for local scripts, services, notebooks, and batch generation. It downloads model assets from Hugging Face, produces 24 kHz NumPy audio, and runs on Linux, macOS, or Windows.

Python 3.8+Linux, macOS, and Windows
CPU by defaultOptional CUDA and ROCm providers
Release 0.8.1Install the published wheel from GitHub
from kittentts import KittenTTS
import soundfile as sf

tts = KittenTTS("KittenML/kitten-tts-nano-0.8")
audio = tts.generate("Small models can still have a big voice.", voice="Bella")
sf.write("speech.wav", audio, 24_000)

What it includes

  • Nano, Nano int8, Micro, and Mini ONNX models.
  • Eight built-in English voices.
  • CPU, CUDA, and ROCm ONNX Runtime provider selection.
  • Long-text chunk generation and generator-based streaming.
  • Text normalization for numbers, currency, dates, times, URLs, units, and more.
  • Hugging Face model download and cache reuse.

Choose another SDK

Use React Native, Swift, Flutter, or Web and Node.js when you need app-native playback, bundled mobile assets, word timings, or browser execution.

Repository: KittenML/KittenTTS