High-quality text-to-speech model with 82M parameters and 24 voices (American/British English).
1# FP16 model (recommended default - 169MB)
2wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.fp16.onnx
3
4# Voice embeddings (required)
5wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin
6mv voices-v1.0.bin voices.bin
7
8# Misaki dictionaries (for MisakiDictionary backend - default)
9mkdir -p misaki
10wget -O misaki/us_gold.json https://raw.githubusercontent.com/hexgrad/misaki/refs/heads/main/misaki/resources/en/us_gold.json
11wget -O misaki/us_silver.json https://raw.githubusercontent.com/hexgrad/misaki/refs/heads/main/misaki/resources/en/us_silver.json
12
13# Optional: INT8 for mobile (88MB, 72% smaller)
14wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.int8.onnx
15
16# Optional: FP32 for reference (310MB)
17wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.onnx
1{
2 "execution_template": {
3 "type": "SimpleMode",
4 "model_file": "kokoro-v1.0.fp16.onnx" // or .int8.onnx or .onnx
5 }
6}
Kokoro requires text-to-phoneme conversion before audio synthesis. Xybrid supports multiple backends:
1{
2 "preprocessing": [{
3 "type": "Phonemize",
4 "backend": "MisakiDictionary",
5 "tokens_file": "tokens.txt"
6 }]
7}
Uses the espeak-ng system command for phonemization.
1{
2 "preprocessing": [{
3 "type": "Phonemize",
4 "backend": "EspeakNG",
5 "language": "en-us",
6 "tokens_file": "tokens.txt"
7 }]
8}
1# macOS
2brew install espeak-ng
3
4# Ubuntu/Debian
5apt-get install espeak-ng
6
7# Windows
8# Download from https://github.com/espeak-ng/espeak-ng/releases
1{
2 "preprocessing": [{
3 "type": "Phonemize",
4 "backend": "MisakiDictionary", // or "EspeakNG"
5 "tokens_file": "tokens.txt"
6 }]
7}
1use xybrid_core::template_executor::TemplateExecutor;
2
3let executor = TemplateExecutor::from_metadata_file("test_models/kokoro-82m/model_metadata.json")?;
4let audio = executor.run_text("Hello, world!")?;