https://github.com/thewh1teagle/kokoro-onnx
TTS with kokoro and onnx runtime
https://github.com/thewh1teagle/kokoro-onnx
kokoro onnxruntime python tts
Last synced: 22 days ago
JSON representation
TTS with kokoro and onnx runtime
- Host: GitHub
- URL: https://github.com/thewh1teagle/kokoro-onnx
- Owner: thewh1teagle
- License: mit
- Created: 2025-01-03T14:59:41.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-04-05T21:37:01.000Z (29 days ago)
- Last Synced: 2025-04-05T22:24:46.861Z (29 days ago)
- Topics: kokoro, onnxruntime, python, tts
- Language: Python
- Homepage: https://pypi.org/project/kokoro-onnx
- Size: 497 KB
- Stars: 1,850
- Watchers: 14
- Forks: 176
- Open Issues: 61
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- StarryDivineSky - thewh1teagle/kokoro-onnx - onnx项目是一个使用kokoro模型和ONNX Runtime进行文本到语音转换(TTS)的项目。它允许用户利用kokoro模型生成语音,并利用ONNX Runtime加速推理过程。该项目的主要特色在于结合了kokoro模型的高质量语音合成能力和ONNX Runtime的高效执行效率。项目的工作原理是首先将文本输入kokoro模型,模型输出语音特征,然后这些特征被传递给声码器,最终生成语音。用户可以通过该项目体验快速且高质量的TTS服务。项目可能包含模型转换、推理代码和相关配置文件等。 (语音合成 / 资源传输下载)
README
# kokoro-onnx

[](https://pypi.org/project/kokoro-onnx/)
[](https://github.com/thewh1teagle/kokoro-onnx/releases)
[](https://github.com/thewh1teagle/kokoro-onnx/blob/main/LICENSE)
[](https://github.com/thewh1teagle/kokoro-onnx/stargazers)
[](https://pypi.org/project/kokoro-onnx/)[](https://github.com/microsoft/onnxruntime)

TTS with onnx runtime based on [Kokoro-TTS](https://huggingface.co/spaces/hexgrad/Kokoro-TTS)
🚀 Version 1.0 models are out now! 🎉
## Features
- Supports multiple languages
- Fast performance near real-time on macOS M1
- Offer multiple voices
- Lightweight: ~300MB (quantized: ~80MB)## Setup
```console
pip install -U kokoro-onnx
```Instructions
1. Install [uv](https://docs.astral.sh/uv/getting-started/installation) for isolated Python (Recommend).
Basically open the terminal (PowerShell / Bash) and run the command listed in their website.
_Note: you don't have to use `uv`. but it just make things much simpler. You can use regular Python as well._
2. Create new project folder (you name it)
3. Run in the project folder```console
uv init -p 3.12
uv add kokoro-onnx soundfile
```4. Paste the contents of [`examples/save.py`](https://github.com/thewh1teagle/kokoro-onnx/blob/main/examples/save.py) in `hello.py`
5. Download the files [`kokoro-v1.0.onnx`](https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.onnx), and [`voices-v1.0.bin`](https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin) and place them in the same directory.
6. Run```console
uv run hello.py
```You can edit the text in `hello.py`
That's it! `audio.wav` should be created.
## Examples
See [examples](examples)
## Voices
See the latest voices and languages in [Kokoro-82M/VOICES.md](https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md)
Note: It's recommend to use misaki g2p package from v1.0, see [examples](examples)
## Contribute
See [CONTRIBUTE.md](CONTRIBUTE.md)
## License
- kokoro-onnx: MIT
- kokoro model: Apache 2.0