AI Personal Learning
and practical guidance

Kokoro-ONNX: Efficient Text-to-Speech Tool with Multi-Language and Multi-Voice Support

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

  1. Open a terminal (PowerShell / Bash).
  2. Run the following command to install Kokoro-ONNX:
   pip install -U kokoro-onnx
  1. Download the required documentskokoro-v0_19.onnxcap (a poem)voices.json, and place them in the same directory.

Usage

  1. Run the following command in a terminal to start Kokoro-ONNX:
   uv init -p 3.12
uv add kokoro-onnx soundfile
  1. commander-in-chief (military)examples/save.pyPaste the contents of thehello.pyCenter.
  2. Download filekokoro-v0_19.onnxcap (a poem)voices.json, and place them in the same directory.
  3. Run the following command to generate a voice:
   python hello.py

Functional operation flow

  1. Select language and voice: invoices.jsonSelect the desired language and voice from the
  2. input text: inhello.pyEnter the text to be converted to speech in the
  3. 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.


May not be reproduced without permission:Chief AI Sharing Circle " Kokoro-ONNX: Efficient Text-to-Speech Tool with Multi-Language and Multi-Voice Support

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish