General Introduction
Kokoro-ONNX is an open source text-to-speech (TTS) tool based on ONNX runtime. Developed by thewh1teagle, the project aims to provide an efficient and fast speech synthesis solution.Kokoro-ONNX supports multiple languages, including English, with support planned for French, Japanese, Korean and Chinese. The tool features a wide selection of voices, including a whisper mode, and has excellent performance, capable of running in near-real time on macOS M1. Kokoro-ONNX's lightweight design makes it easy to install and use, making it suitable for developers and researchers who need an efficient TTS solution.
Function List
- Text-to-speech (TTS) support for multiple languages
- Multiple voice options, including whisper mode
- High performance, near real-time operation
- Lightweight design, installation package about 300MB (about 80MB after quantization)
- Compatible with macOS M1
- Open source, based on MIT and Apache 2.0 licenses
Using Help
Installation process
- Open a terminal (PowerShell / Bash).
- Run the following command to install Kokoro-ONNX:
pip install -U kokoro-onnx
- Download the required documents
kokoro-v0_19.onnx
cap (a poem)voices.json
, and place them in the same directory.
Usage
- Run the following command in a terminal to start Kokoro-ONNX:
uv init -p 3.12
uv add kokoro-onnx soundfile
- commander-in-chief (military)
examples/save.py
Paste the contents of thehello.py
Center. - Download file
kokoro-v0_19.onnx
cap (a poem)voices.json
, and place them in the same directory. - Run the following command to generate a voice:
python hello.py
Functional operation flow
- Select language and voice: in
voices.json
Select the desired language and voice from the - input text: in
hello.py
Enter the text to be converted to speech in the - Generate Speech: After running the script, the generated voice file will be saved in the specified directory.
Featured Functions
- Multi-language support: Kokoro-ONNX currently supports English and plans to support more languages such as French, Japanese, Korean and Chinese.
- Multiple sound options: Users can select different voices, including whisper mode, to meet the needs of different scenarios.
- High performance: Runs in near real-time on macOS M1 for application scenarios that require a quick response.
- Lightweight design: The small size of the installation package makes it easy to deploy and use quickly.
With these steps, users can easily install and use Kokoro-ONNX to realize efficient text-to-speech functions. Detailed operating procedures and rich feature descriptions ensure that users can quickly get started and take full advantage of the tool.