kokoro-onnx
TTS with kokoro and onnx runtime
What it is and what it does
Kokoro-onnx is a text-to-speech engine that runs inference using ONNX Runtime, wrapping the Kokoro-TTS model to generate speech from text. It supports multiple languages and offers a selection of voices, with model weights optimized for size while maintaining performance on modern hardware. The package depends on espeakng-loader for phoneme handling, numpy for numerical operations, onnxruntime for model inference, and phonemizer-fork for linguistic processing.
The typical workflow involves installing the package, downloading the model and voice files from the project's releases, then calling the Kokoro class with text, language, voice, and output parameters. It's designed for developers who need embedded speech synthesis without heavy dependencies like full TensorFlow or PyTorch installations, making it suitable for edge deployment or resource-constrained environments.
Use it for:
- Generate speech for accessibility features in applications that need multiple language support.
- Create audio narration for content in real-time or batch processing pipelines.
- Build chatbot or voice assistant backends with lightweight inference on consumer hardware.
- Produce multilingual voiceovers for media or educational content with minimal model overhead.
- Prototype or deploy TTS features in resource-limited environments like embedded systems or edge devices.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts text to speech using ONNX Runtime, supporting multiple languages and voices with performance optimized for modern hardware.
Yes, if you need lightweight multilingual text-to-speech with ONNX inference. The low installation friction, active maintenance, and zero known vulnerabilities make it a practical choice. However, verify the unclear license treatment against your project's requirements, and plan for the separate download of model files before first use.
Install
kokoro-onnx on PyPI
pip
pip install kokoro-onnxuv
uv add kokoro-onnxpoetry
poetry add kokoro-onnxInstalling kokoro-onnx
Before you install
Low installation friction with a pure Python wheel and four runtime dependencies. Active maintenance with recent commits.
License in practice
License treatment is unclear in the package metadata, though the description notes the package itself is MIT while the underlying Kokoro model uses Apache 2.0. Verify licensing terms before use in proprietary or restricted contexts.
Quickstart
pip install kokoro-onnx
from kokoro_onnx import Kokoro
kokoro = Kokoro(lang="en-us")
kokoro.create(text="Hello world", voice="af_heart", speed=1.0, outfile="audio.wav")
Requires downloading model files (kokoro-v1.0.onnx and voices-v1.0.bin) separately and placing them in the working directory before first use.
Verify before relying
- Whether the unclear license treatment poses practical restrictions for commercial or closed-source projects.
- Performance characteristics on hardware other than macOS M1 mentioned in the description.
- Whether all supported languages and voices are documented outside the external Hugging Face link.
- Exact size of downloaded model files in typical deployment scenarios.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<3.14,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — espeakng-loader, numpy, onnxruntime, phonemizer-fork |
| Maintenance | actively maintained — 196 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 550,894/month — #6,052 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kokoro_onnx-0.5.0-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
kokoroKokoro is an inference library for the…
permissive · top 15,000 on PyPI
piper-ttsPiper TTS is a local neural text-to-speech…
copyleft · top 5,000 on PyPI
pocket-ttsPocket TTS generates speech from text on CPU…
unclear · top 15,000 on PyPI
misakiConverts written text to phonetic…
permissive · top 15,000 on PyPI
pyopenjtalkWraps OpenJTalk to provide Japanese…
permissive · top 15,000 on PyPI
TTSTTS is a deep learning library for…
copyleft · top 15,000 on PyPI
pyttsx3pyttsx3 converts text to speech offline using…
copyleft · top 5,000 on PyPI
coqui-ttsCoqui TTS synthesizes speech from text using…
copyleft · top 15,000 on PyPI
chatterbox-ttsChatterbox TTS converts text to speech using…
permissive · top 15,000 on PyPI
nemo-text-processingConverts text to normalized form and back…
permissive · top 15,000 on PyPI