KittenTTS: State-of-the-Art TTS Under 25MB That Runs on CPU

KittenTTS delivers high-quality text-to-speech in models as small as 25MB, running entirely on CPU. Learn how to use it, its API, and why it matters for edge AI.

KittenTTS: State-of-the-Art TTS Under 25MB That Runs on CPU

Text-to-speech (TTS) has traditionally been a heavyweight task. Most production-grade models require a GPU, hundreds of megabytes of weights, and complex inference pipelines. That's why KittenTTS is such a breath of fresh air: it's an open-source, ONNX-based TTS library that delivers high-quality voice synthesis in models as small as 25MB (int8 quantized) and runs entirely on CPU. No GPU required.

With 15.3k stars on GitHub and a growing community, KittenTTS is proving that edge-deployable TTS is not only possible but practical. In this post, we'll dive into what makes it special, how to get started, and how you can integrate it into your own projects.

Why Size Matters in TTS

Most TTS models today are massive. For example, some popular neural TTS systems exceed 1GB in size and demand a CUDA-capable GPU for real-time inference. This makes them impractical for:

  • Edge devices like Raspberry Pi, IoT gateways, or mobile phones
  • Serverless functions with tight memory limits
  • Desktop apps that need to ship lightweight
  • Real-time applications where latency and resource usage matter

KittenTTS flips this by offering models from 15M to 80M parameters, with on-disk sizes ranging from 25MB to 80MB. The smallest variant, kitten-tts-nano int8, is just 25MB — small enough to embed in almost any application.

Built on ONNX for CPU Efficiency

KittenTTS is built on ONNX (Open Neural Network Exchange), which means the models are optimized for inference across a variety of hardware. The library uses ONNX Runtime, which is highly optimized for CPU execution. This is a key design choice: it allows KittenTTS to run efficiently on machines without a GPU, making it accessible to a much wider audience.

You can even run it on a GPU if you want, by installing the GPU requirements and specifying backend="cuda". But the default CPU path is impressively fast.

Available Models

KittenTTS v0.8 offers four model variants:

Model Parameters Size Hugging Face ID
kitten-tts-mini 80M 80 MB KittenML/kitten-tts-mini-0.8
kitten-tts-micro 40M 41 MB KittenML/kitten-tts-micro-0.8
kitten-tts-nano 15M 56 MB KittenML/kitten-tts-nano-0.8
kitten-tts-nano (int8) 15M 25 MB KittenML/kitten-tts-nano-0.8-int8

Note: Some users have reported issues with the int8 variant. If you encounter problems, the maintainers ask you to open an issue on GitHub.

Quick Start

Getting started is straightforward. First, install the library via pip:

pip install https://github.com/KittenML/KittenTTS/releases/download/0.8.1/kittentts-0.8.1-py3-none-any.whl

Then, generate your first speech sample:

from kittentts import KittenTTS

model = KittenTTS("KittenML/kitten-tts-mini-0.8")
audio = model.generate("This high-quality TTS model runs without a GPU.", voice="Jasper")

import soundfile as sf
sf.write("output.wav", audio, 24000)

That's it. You now have a WAV file with natural-sounding speech, generated entirely on CPU.

Advanced Usage

KittenTTS gives you fine-grained control over synthesis:

# Adjust speech speed (default: 1.0)
audio = model.generate("Hello, world.", voice="Luna", speed=1.2)

# Save directly to a file
model.generate_to_file("Hello, world.", "output.wav", voice="Bruno", speed=0.9)

# List available voices
print(model.available_voices)
# ['Bella', 'Jasper', 'Luna', 'Bruno', 'Rosie', 'Hugo', 'Kiki', 'Leo']

You can also use a GPU if you have one:

pip install -r requirements_gpu.txt
m = KittenTTS("KittenML/kitten-tts-mini-0.8", backend="cuda")

Text Normalization: A Hidden Gem

One of the most underrated features is the built-in text normalization pipeline. It handles numbers, currencies, units, dates, times, and more. This is crucial for producing natural-sounding speech from raw text.

from kittentts import normalize_text

normalized = normalize_text("Dr. Rivera paid $12.50 at 3:05 p.m.")
# "Doctor Rivera paid twelve dollars and fifty cents at three oh five p m."

You can also get character spans for the normalized segments, which is useful for alignment or highlighting:

result = normalize_text("Fig. 2", return_spans=True)
print(result.text)
print(result.spans)

This is a huge time-saver, because text normalization is often a pain point in TTS pipelines.

API Reference

KittenTTS(model_name, cache_dir=None)

Load a model from Hugging Face Hub.

  • model_name (str): Hugging Face repository ID. Default: "KittenML/kitten-tts-nano-0.8"
  • cache_dir (str, optional): Local directory for caching downloaded model files.

model.generate(text, voice, speed, clean_text)

Synthesize speech from text, returning a NumPy array of audio samples at 24 kHz.

  • text (str): Input text to synthesize
  • voice (str): Voice name (default: "expr-voice-5-m")
  • speed (float): Speech speed multiplier (default: 1.0)
  • clean_text (bool): Preprocess text (expand numbers, currencies, etc.) (default: False)

model.generate_to_file(text, output_path, voice, speed, sample_rate, clean_text)

Synthesize speech and write directly to an audio file.

  • text (str): Input text to synthesize
  • output_path (str): Path to save the audio file
  • voice (str): Voice name
  • speed (float): Speech speed multiplier (default: 1.0)
  • sample_rate (int): Audio sample rate in Hz (default: 24000)
  • clean_text (bool): Preprocess text (default: True)

normalize_text(text, locale="en-US", return_spans=False)

Normalize text for TTS without generating audio.

model.available_voices

Returns a list of available voice names: ['Bella', 'Jasper', 'Luna', 'Bruno', 'Rosie', 'Hugo', 'Kiki', 'Leo']

System Requirements

  • OS: Linux, macOS, or Windows
  • Python: 3.8 or later
  • Hardware: CPU only (GPU optional)
  • Disk space: 25-80 MB depending on model variant

A virtual environment is recommended to avoid dependency conflicts.

Roadmap and Community

The project is actively developed. The roadmap includes:

  • Release optimized inference engine
  • Release mobile SDK
  • Release higher quality TTS models
  • Release multilingual TTS
  • Release KittenASR (automatic speech recognition)

You can join the community on Discord or visit kittenml.com. For commercial support, including custom voices and enterprise licensing, contact [email protected].

License

KittenTTS is licensed under the Apache License 2.0, which is permissive for both personal and commercial use.

Final Thoughts

KittenTTS is a remarkable achievement in the TTS space. It proves that you don't need a GPU cluster to generate natural-sounding speech. With its small footprint, CPU-friendly inference, and clean API, it's an excellent choice for edge applications, desktop software, and any project where resources are constrained.

If you're building a voice assistant, an accessibility tool, or just want to add speech to your app without the overhead, give KittenTTS a try. The 25MB model is a game-changer.

Try the live demo on Hugging Face Spaces and hear it for yourself.

Source

KittenML/KittenTTS: State-of-the-art TTS model under 25MB 😻