Skip to main content

TTS with kokoro and onnx runtime

Project description

kokoro-onnx

Python Version PyPI Release Github Model Releases License GitHub stars PyPI Downloads

ONNX Runtime CPU GPU

TTS with onnx runtime based on Kokoro-TTS

🚀 Version 1.0 models are out now! 🎉

https://github.com/user-attachments/assets/00ca06e8-bbbd-4e08-bfb7-23c0acb10ef9

Features

  • Supports multiple languages
  • Fast performance near real-time on macOS M1
  • Offer multiple voices
  • Lightweight: ~300MB (quantized: ~80MB)

Setup

pip install -U kokoro-onnx
Instructions
  1. Install uv for isolated Python (Recommend).
pip install uv
  1. Create new project folder (you name it)
  2. Run in the project folder
uv init -p 3.12
uv add kokoro-onnx soundfile
  1. Paste the contents of examples/save.py in hello.py
  2. Download the files kokoro-v1.0.onnx, and voices-v1.0.bin and place them in the same directory.
  3. Run
uv run hello.py

You can edit the text in hello.py

That's it! audio.wav should be created.

Examples

See examples

Voices

See the latest voices and languages in Kokoro-82M/VOICES.md

Note: It's recommend to use misaki g2p package from v1.0, see examples

Contribute

See CONTRIBUTE.md

License

  • kokoro-onnx: MIT
  • kokoro model: Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kokoro_onnx-0.5.0.tar.gz (84.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kokoro_onnx-0.5.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file kokoro_onnx-0.5.0.tar.gz.

File metadata

  • Download URL: kokoro_onnx-0.5.0.tar.gz
  • Upload date:
  • Size: 84.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kokoro_onnx-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5beb15f085e2828ed8d493f792c079af857103ab2dceaa1e112b1760587ac96a
MD5 8bd8c9269b0d1fbfa21df12878d544c7
BLAKE2b-256 6b18277bd18aeeceaf5c46a51bb50c1cbdccdad8cab7fd1d58f0173bbeeec708

See more details on using hashes here.

File details

Details for the file kokoro_onnx-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: kokoro_onnx-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kokoro_onnx-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e1c38a296db5dbc1f722f69f5e3c13f2e2877b3e5b145287f56ec057013e357
MD5 01afa645e74f09ee5c8b2a9741bd5bd1
BLAKE2b-256 0d550bfcb4aa50033c89e5ac132af3d07fac0543824ce6eaefd4d1bfdcc3795b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page