Skip to main content

kitten-inference

Fast, lightweight inference engines for KittenML's text-to-speech models, in one Python package. One pip install kitten-inference runs every model with no PyTorch and nothing to compile, and picks the right engine and hardware for each:

  • Kitten TTS 2, the large expressive model, on NVIDIA and AMD GPUs.
  • Kitten TTS 2 mini, nano and pico, small multilingual models (up to 16 languages), on the CPU and the Mac GPU.
  • Kitten TTS 0.8, the small English model, on the CPU and the Mac GPU.

Every model uses the same Python API (from kitten_inference import KittenTTS) and command line (kitten-tts). The same engines also build as a C library for Android and iOS apps.

How it compares with the official packages:

Kitten TTS 2 on an NVIDIA GPU Kitten TTS 0.8 on the CPU Kitten TTS 2 mini, nano, pico on the CPU
Key result Complete files 5 to 7 times faster than Kitten TTS 2 on vLLM or llama.cpp The nano model 1.1 to 2.3 times faster than kittenml 0.9.6 (ONNX Runtime) on Linux (x86-64 and ARM64), Windows x64 and Apple Silicon Macs Mini 2.2 to 2.6 times faster than kittenml 0.9.8 (ONNX Runtime int8), at full precision
Speed First streamed audio after about 11 ms (vLLM and llama.cpp: 481 to 643 ms, as they stream whole sentences) About 60 times faster than real time Mini 13 to 16 times faster than real time on 4 threads
Example A short text in 82 ms and a long text in 0.95 s, against 453 to 584 ms and 4.9 to 6.6 s on vLLM, 520 ms and 5.4 s on llama.cpp A 41-word text (15 to 17 s of speech) in 0.29 s, against 0.54 s with ONNX Runtime 69 s of speech from mini in 4.2 s, against 9.3 s with ONNX Runtime
Measured on RTX PRO 6000, one request at a time; vLLM through kittenml 0.9.6 Ryzen 9 9900X (12 cores), default settings of both packages (on Apple Silicon this engine uses the GPU) Ryzen 9 9900X and 5950X at 4 threads (Arm64 Cortex-X925: 2.0 times)

On smaller GPUs the Kitten TTS 2 lead is smaller: first audio after 22 ms and complete files 4.5 to 6.9 times faster on an RTX 4090, 58 ms and 2.4 to 4.3 times on a 12 GB RTX 3060. Word error rate on short texts is 0.02 to 0.05% for every engine compared.

Kitten TTS 2 native against vLLM and llama.cpp: time to make a complete file on an RTX PRO 6000, RTX 4090 and RTX 3060

Kitten TTS 0.8 engine against ONNX Runtime on the CPU, 80M int8 model: latency and peak memory on an Android phone (Cortex-A77), a Core i7-12650H laptop and an Apple M2 Pro

Kitten TTS 2 mini, nano and pico on the CPU against the official int8 ONNX files (ONNX Runtime): real-time factor on Arm64, Ryzen 9 9900X and Ryzen 9 5950X

Install

Every model uses from kitten_inference import KittenTTS with an explicit model name (API).

The commands below start a virtual environment and install support for all three model families. On Ubuntu and Debian, python3 -m venv needs sudo apt-get update && sudo apt-get install -y python3-venv first. On Windows, run the blocks in a Command Prompt (in PowerShell, type cmd first), with py -m venv .venv and then .venv\Scripts\activate.bat in place of the first line. On macOS, run the blocks in Terminal. A new Mac has no Python 3: python3 only opens a dialog that offers the developer tools (you can cancel it). Install Python 3.14 with the "macOS 64-bit universal2 installer" from python.org (not 3.15, which needs a C compiler for a dependency), then open a new Terminal window. In every new Terminal window, run . .venv/bin/activate again in the same folder before python or kitten-tts.

Kitten TTS 2: NVIDIA and AMD GPUs

python3 -m venv .venv && . .venv/bin/activate
python -m pip install -U pip
pip install kitten-inference
kitten-tts --model KittenML/kitten-tts-2 --text "Hello from Kitten TTS 2." --voice Bruno --output hello.wav
  • NVIDIA GPU on Linux x86-64 (glibc 2.28 or newer: Ubuntu 20.04, Debian 10, RHEL 8 or later) or Windows x64, with driver R570 or newer.
  • Python 3.9 to 3.14 (Python 3.15 needs a C compiler until PyYAML, a dependency, ships ready-made 3.15 packages). First use downloads the model (about 4.6 GB) and prepares it once, in about 1 to 3 minutes; later starts reuse it.
  • AMD Radeon RX 7000 and RX 9000: supported inside WSL2 on Windows 11, experimental on Linux x86-64 without WSL2. Install ROCm 7 first (WSL2: step 1 of AMD Radeon; Linux without WSL2: AMD's ROCm guide for your distribution), then run the same commands: the package finds the Radeon (on a PC that also has an NVIDIA GPU, add --backend rocm). Real-time factor about 0.06 on an RX 9070 XT (10 s of speech in about 0.6 s). No voice cloning on Radeon.
  • Voice cloning (NVIDIA only) needs FFmpeg (sudo apt-get update && sudo apt-get install -y ffmpeg; on Windows winget install --id Gyan.FFmpeg -e, then open a new Command Prompt and activate the venv again; Windows Server 2022 needs winget installed first) and about 11,300 MiB (11 GB) of free GPU memory while the voice is built: on a 12 GB card, other programs may use at most about 500 MiB.
  • GeForce GTX 10, GTX 16 and RTX 20 series: supported, not optimal: they have no bf16 tensor cores, so part of the math runs in software (real-time factor 0.22 to 0.37 for complete files on desktop cards with 6 GB or more, against 0.05 to 0.08 on RTX 30, 40 and 50 series cards).
  • Without Python: the engine is also a C library and the kitten-tts-native command. Build it with git clone --branch v0.2.0 https://github.com/KittenML/kitten-inference.git, then cd kitten-inference/engines/tts2, and follow engines/tts2/README.md.

The package picks its memory settings from the free GPU memory (GPU memory):

GPU memory Built-in voices Voice cloning
24 GB or more default profile: about 13,500 MiB with one voice yes: about 15,600 MiB while a voice is built
16 GB default profile when it fits, else the low-memory profile yes, with the low-memory profile: about 11,300 MiB
12 GB low-memory profile, about 9,100 MiB: supported, not optimal, because requests at the same time share smaller buffers (one at a time runs as fast: real-time factor 0.050 against 0.051 on a 16 GB card) only with about 11,300 MiB free; 10 GB cards: no
4 to 8 GB low-memory profile fitted to the card: supported, not optimal (one request at a time; complete files about 1.5% slower) no: build and save the voice on a larger GPU, then load it

Kitten TTS 0.8: the CPU

python3 -m venv .venv && . .venv/bin/activate
python -m pip install -U pip
pip install kitten-inference
python -c "from kitten_inference import KittenTTS; KittenTTS('KittenML/kitten-tts-nano-0.8').generate_to_file('Hello from Kitten TTS.', 'hello.wav', voice='Jasper')"
  • Supported: Python 3.8 to 3.14 on Linux x86-64 and ARM64 and Windows x64, and Python 3.9 to 3.14 on Apple Silicon Macs (Python 3.15 needs a C compiler until PyYAML ships ready-made 3.15 packages; Python 3.8 on a Mac needs the developer tools, xcode-select --install, because cffi and PyYAML have no ready-made 3.8 packages for Apple Silicon). Experimental: Intel Macs (the macOS build uses one CPU core), Windows ARM64 (no ARM vector kernels, about 9 times slower than Linux ARM64) and Android ARM64 (platforms).
  • On Windows, if KittenTTS() reports "espeak not installed", install the Microsoft Visual C++ Redistributable: winget install Microsoft.VCRedist.2015+.x64.
  • On Windows, keep the virtual environment's path under about 150 characters; longer paths stop TTS 0.8 with an error that says so.
  • Supported, not optimal:
    • int8 models on Intel CPUs: the int8 kernels for x86 are not tuned yet, so they take 1.2 to 2.2 times the ONNX Runtime time;
    • int8 models on Apple Silicon: the macOS build uses one CPU core, so they take 1.4 to 1.8 times the ONNX Runtime time;
    • creating a model again on the Mac GPU (Metal): each new KittenTTS keeps about 290 MB (nano) to 470 MB (mini) until the process ends, because the engine does not free its GPU copies of the weights yet. Create each model once and reuse it.

Kitten TTS 2 mini, nano and pico: the CPU and the Mac GPU

Three small multilingual models, from the same install as Kitten TTS 0.8. Nothing to compile, no extras.

Model Size Download on first use Languages
KittenML/kitten-tts-2-mini 82M parameters, one model for all languages about 330 MB once 16: en de es fr it pt ru hi da fi ja ko nl sv sw tr
KittenML/kitten-tts-2-nano 17M parameters per language about 70 MB per language 8: en de es fr it pt ru hi
KittenML/kitten-tts-2-pico 7M parameters per language about 30 MB per language the same 8

English and Japanese need Python 3.10 to 3.14 (python3 --version; on an older one use, for example, python3.12 -m venv .venv).

python3 -m venv .venv && . .venv/bin/activate
python -m pip install -U pip
pip install kitten-inference
python -c "from kitten_inference import KittenTTS; KittenTTS('KittenML/kitten-tts-2-nano').generate_to_file('Guten Morgen.', 'hallo.wav', language='de')"
python -c "from kitten_inference import KittenTTS; KittenTTS('KittenML/kitten-tts-2-nano').generate_to_file('Hello from Kitten TTS 2.', 'hello.wav')"
  • Precision: float32 by default. KittenTTS(model, precision="int8") (or --precision int8) is smaller and faster on most Arm64 CPUs; on x86-64 keep float32 unless you run Linux on a CPU with AVX-512 VNNI.
  • Backend: the CPU everywhere. On Apple Silicon Macs float32 runs on the Mac GPU by default; backend="cpu" keeps it on the CPU. backend="cuda" (--backend cuda) runs float32 on NVIDIA GPUs (Linux x86-64, Windows x64, driver R570+).
  • Voices and speed: each language has its own voices: KittenTTS(model).list_voices(language="de"); without voice= the language's first voice speaks. speed= goes from 0.25 to 4.
  • First use downloads the official files from Hugging Face and converts them once (a few seconds) into the cache; on a read-only system pass cache_dir= with a writable folder. Japanese (mini only) also downloads a 47 MB dictionary once.
  • Threads: one per logical CPU on Linux and Windows (set OMP_NUM_THREADS to use fewer); one core on macOS.
  • Command line: kitten-tts --model KittenML/kitten-tts-2-nano --text "Guten Morgen." --language de --output hallo.wav.
  • Requirements: x86-64 CPUs need AVX2 and FMA; Linux Arm64 CPUs need the dot-product instructions (Raspberry Pi 5 yes, Pi 4 no); Linux needs glibc 2.29 or newer; Japanese is not available on Windows on Arm. The package says so when something is missing.

Speed, memory, int8 and server numbers: engine README.

Use from Python

from kitten_inference import KittenTTS

tts = KittenTTS("KittenML/kitten-tts-2")
tts.save_wav("hello.wav", tts.generate("Hello from Kitten TTS 2.", voice="Bruno"))
for chunk in tts.stream("Streaming speech, chunk by chunk.", voice="Bruno"):
    ...
from kitten_inference import KittenTTS

KittenTTS("KittenML/kitten-tts-nano-0.8").generate_to_file("Hello from Kitten TTS.", "hello.wav", voice="Jasper")
from kitten_inference import KittenTTS

with KittenTTS("KittenML/kitten-tts-2-mini") as tts:
    print(tts.list_voices(language="fr"))
    tts.generate_to_file("Bonjour, comment allez-vous ?", "bonjour.wav", language="fr")

Docs

License

KittenML's code is Apache-2.0 (LICENSE); the package also contains third-party code under other licences (NOTICE, engines/tts2/NOTICE, engines/tts08/NOTICE). The models download on first use and keep their publishers' licences. The Kitten TTS 2 model is under the Stellon Labs Community License, not Apache or MIT: it limits commercial use, training on the outputs and redistribution, so read it before you build on Kitten TTS 2. The Kitten TTS 0.8 model licences are in engines/tts08/README.md. The Kitten TTS 2 mini, nano and pico models are Apache-2.0 (see their Hugging Face pages).

Metadata

Release files for haaztest-kitten-inference 0.2.0.post12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for haaztest-kitten-inference 0.2.0.post12
File Actions
haaztest_kitten_inference-0.2.0.post12-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp314-cp314-manylinux_2_28_x86_64.whl
haaztest_kitten_inference-0.2.0.post12-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp313-cp313-manylinux_2_28_x86_64.whl
haaztest_kitten_inference-0.2.0.post12-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp312-cp312-manylinux_2_28_x86_64.whl
haaztest_kitten_inference-0.2.0.post12-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp311-cp311-manylinux_2_28_x86_64.whl
haaztest_kitten_inference-0.2.0.post12-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp310-cp310-manylinux_2_28_x86_64.whl
haaztest_kitten_inference-0.2.0.post12-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details for haaztest_kitten_inference-0.2.0.post12-cp39-cp39-manylinux_2_28_x86_64.whl

Total release size: 455.2 MB

Release files / haaztest_kitten_inference-0.2.0.post12-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp314-cp314-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ef27fb5090a1d416b7c29c4a922e5e7d91a3085dbd23db91dcff79d3da6730bb
BLAKE2b-256 checksum
How to use checksums
b45b393b634370b58ea9557179d5a92b44eb3135013a44a2142b36a65b63c779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / haaztest_kitten_inference-0.2.0.post12-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp313-cp313-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
42d334a6701b6645d9cbe38a08326eeff891ed02aee8ea0b0d156a7035bc488f
BLAKE2b-256 checksum
How to use checksums
3375dc3e7a30aba53c0416a217bec5d3add72020ec82a7e92fb4b0d511bea777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / haaztest_kitten_inference-0.2.0.post12-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp312-cp312-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7ecc68087c5b82a52bfa13127ea2eff3e950364d2ad636c0a9d62b512905321f
BLAKE2b-256 checksum
How to use checksums
4a878694ea4ba1d25607ef16dcb0dff33bc68a3a88c10b0c06f5005ac250e1ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / haaztest_kitten_inference-0.2.0.post12-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp311-cp311-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
af0c02954fed719aa07262effbdc61202633eb9e31685039d0d2da93360bea25
BLAKE2b-256 checksum
How to use checksums
b88e385bcb2e46e110148de790820f9ac752fa01a1776ffa11f18a68c55da2c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / haaztest_kitten_inference-0.2.0.post12-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp310-cp310-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5025cf97379c14696f62bb127eb31c961cf10a8b81bc00eb55559992f7a79511
BLAKE2b-256 checksum
How to use checksums
a38c46a7ccbf186416e5e7737d19e8e798afbb7742bbad71fda0ddaec8d67e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / haaztest_kitten_inference-0.2.0.post12-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL haaztest_kitten_inference-0.2.0.post12-cp39-cp39-manylinux_2_28_x86_64.whl
Size 75.9 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ec3f4015a901d64f36d0e4febf0c815480d19c6d6341ed2883e864e148e07c82
BLAKE2b-256 checksum
How to use checksums
2570181048fb5727de6e28d549ba6be3cb1cfc16a8a289a8211c8ba94998893c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for haaztest-kitten-inference 0.2.0.post12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page