kokoro
TTS
What it is and what it does
Kokoro is a Python wrapper around the Kokoro-82M text-to-speech model, a lightweight neural network with 82 million parameters designed to generate natural-sounding speech from text. It handles phoneme conversion, voice synthesis, and audio generation in a single pipeline, supporting multiple languages (American English, British English, Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese, and Mandarin Chinese) through language-specific codes and optional misaki extensions.
The library is built for both interactive use (Jupyter notebooks, Google Colab) and production deployment. It depends on torch for inference, transformers for model loading, huggingface-hub for downloading weights, and misaki for grapheme-to-phoneme conversion. Audio output is generated at 24000 Hz sample rate. The model weights are Apache-licensed, making it suitable for commercial and personal projects without licensing friction.
Use it for:
- Generate speech from long-form text in Jupyter notebooks or Colab for prototyping and testing voice synthesis.
- Build a multilingual chatbot or voice assistant that speaks in multiple languages with preset voice profiles.
- Create audiobook or podcast narration pipelines by splitting text and synthesizing each section with consistent voice.
- Deploy a lightweight TTS service in resource-constrained environments where model size and inference speed matter.
- Experiment with different voice profiles and languages without managing model weights or phoneme rules manually.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Kokoro is an inference library for the Kokoro-82M text-to-speech model, enabling you to generate spoken audio from text in multiple languages with a lightweight, open-weight neural network.
Yes, with conditions. Install kokoro if you need a lightweight, open-weight TTS model for prototyping or production use and can tolerate the aging maintenance status (last release 496 days ago). The Apache license is permissive, install friction is low, and the package has solid community adoption. However, verify that the preset voices and supported languages meet your needs, and be aware that torch and transformers are heavy dependencies. If you require active development or frequent updates, check the repository first.
Install
kokoro on PyPI
pip
pip install kokorouv
uv add kokoropoetry
poetry add kokoroInstalling kokoro
Before you install
Low install friction with a pure-Python wheel. The package depends on torch, transformers, huggingface-hub, numpy, loguru, and misaki—all standard ML dependencies. Maintenance status is aging (last release 496 days ago), though the repository remains active with recent commits and substantial community interest (8421 stars).
License in practice
Apache License 2.0 is permissive and allows commercial use, modification, and redistribution with minimal restrictions. You can deploy this package in production or personal projects without licensing concerns.
Quickstart
pip install kokoro>=0.9.4
from kokoro import KPipeline
pipeline = KPipeline(lang_code='a')
generator = pipeline('Hello world', voice='af_heart')
for gs, ps, audio in generator:
print(gs, ps) # graphemes, phonemes
# audio is a numpy array at 24000 Hz sample rate
Requires espeak-ng system library (install via apt-get on Linux, .msi installer on Windows, or conda). Python >=3.10,<3.13 only. torch and transformers are heavy dependencies; initial model download from Hugging Face Hub occurs on first use.
Verify before relying
- Whether voice cloning or custom voice loading is supported beyond the preset voices mentioned in examples.
- Inference speed and memory footprint on CPU-only systems or edge devices.
- Quality comparison to larger commercial TTS models in production scenarios.
- Support status and roadmap given the aging maintenance signal (last release 496 days ago).
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | capped below the current Python release (<3.13,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — huggingface-hub, loguru, misaki, numpy, torch, transformers |
| Maintenance | aging — 496 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 622,780/month — #5,708 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kokoro-0.9.4-py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
kokoro-onnxConverts text to speech using ONNX Runtime,…
unclear · top 15,000 on PyPI
misakiConverts written text to phonetic…
permissive · top 15,000 on PyPI
chatterbox-ttsChatterbox TTS converts text to speech using…
permissive · top 15,000 on PyPI
espeakng-loaderLoads the espeak-ng shared library and makes it…
unclear · top 5,000 on PyPI
lhotseLhotse prepares multimodal (speech, audio,…
permissive · top 5,000 on PyPI
coqui-ttsCoqui TTS synthesizes speech from text using…
copyleft · top 15,000 on PyPI
pocket-ttsPocket TTS generates speech from text on CPU…
unclear · top 15,000 on PyPI
piper-ttsPiper TTS is a local neural text-to-speech…
copyleft · top 5,000 on PyPI
omnivoiceOmniVoice generates speech from text in over…
permissive · top 15,000 on PyPI
mlx-audioMLX-Audio provides text-to-speech,…
permissive · top 15,000 on PyPI