TTS with onnx runtime based on Kokoro-TTS
podcast.mp4
- Support
English
,French
,Japanse
,Korean
, andChinese
- 4X Faster than realtime (macOS M1)
- Support multiple voices including whispering
pip install -U kokoro-onnx
- You also need
kokoro-v0_19.onnx
andvoices.json
- Please see examples
Instructions
- Install uv 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.
- Create new project folder (you name it)
- Run in the project folder
uv init -p 3.12
uv add kokoro-onnx soundfile
- Paste the contents of
examples/save.py
inhello.py
- Download the files
kokoro-v0_19.onnx
, andvoices.json
and place them in the same directory. - Run
uv run hello.py
You can edit the text in hello.py
That's it! audio.wav
should be created.
See examples
Available voices are af
, af_bella
, af_nicole
, af_sarah
, af_sky
, am_adam
, am_michael
, bf_emma
, bf_isabella
, bm_george
, bm_lewis
See CONTRIBUTE.md