Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KittenML/KittenTTS/llms.txt

Use this file to discover all available pages before exploring further.

KittenTTS runs on CPU only. No GPU is required or supported.
1

Install the package

Install KittenTTS directly from the GitHub release:
pip install https://github.com/KittenML/KittenTTS/releases/download/0.8.1/kittentts-0.8.1-py3-none-any.whl
2

Load a model

KittenTTS offers three model sizes. Choose based on your quality and speed requirements:
from kittentts import KittenTTS

model = KittenTTS("KittenML/kitten-tts-mini-0.8")   # 80M — highest quality
# model = KittenTTS("KittenML/kitten-tts-micro-0.8") # 40M — balanced speed and quality
# model = KittenTTS("KittenML/kitten-tts-nano-0.8")  # 15M — smallest and fastest
Models are downloaded from Hugging Face on first use and cached locally. You can specify a custom cache directory:
model = KittenTTS("KittenML/kitten-tts-mini-0.8", cache_dir="/path/to/cache")
3

Generate audio and save to file

Generate speech from text and save the result as a WAV file:
import soundfile as sf
from kittentts import KittenTTS

model = KittenTTS("KittenML/kitten-tts-mini-0.8")

text = """One day, a little girl named Lily found a needle in her room. She knew it was difficult to play with it because it was sharp."""

audio = model.generate(text=text, voice="Bruno")
sf.write("output.wav", audio, 24000)
generate() returns a NumPy array at 24 kHz. You can use any audio library that accepts NumPy arrays, or use generate_to_file() to skip the intermediate step:
model.generate_to_file(text, "output.wav", voice="Bruno")
4

List available voices

Check which voices are available on your loaded model:
print(model.available_voices)
# ['Bella', 'Jasper', 'Luna', 'Bruno', 'Rosie', 'Hugo', 'Kiki', 'Leo']

Advanced usage

# Speed > 1.0 is faster, < 1.0 is slower
audio = model.generate("Hello, world.", voice="Luna", speed=1.2)
If you omit the voice argument, KittenTTS uses Leo by default. Pass any name from model.available_voices to switch voices.

Next steps

How it works

Learn about the ONNX runtime and how KittenTTS processes text into audio.

Voices

Explore the available voices and how to choose the right one for your use case.

Models overview

Compare model sizes and understand the trade-offs between quality and speed.

API reference

Full reference for the KittenTTS class, parameters, and return values.

Build docs developers (and LLMs) love