Built-in Kokoro Voices
Kokoro TTS v1.0 provides 54 high-quality voices out of the box, including both English and Spanish speakers.Voice Files
Kokoro requires two files in thevoices/kokoro-v1.0/ directory:
Download these files from the kokoro-onnx releases page. They’re too large to include in the repository.
Voice Loading
The Kokoro wrapper loads voices from the binary file using NumPy:Voice Naming Convention
Kokoro voices follow a specific naming pattern:- Format:
{age}{gender}_{name} - Age codes:
a(adult),y(young),o(old) - Gender codes:
f(female),m(male)
Examples
| Voice Name | Description |
|---|---|
af_bella | Adult female - Bella (default English voice) |
af_sarah | Adult female - Sarah |
am_adam | Adult male - Adam |
ef_dora | Spanish adult female - Dora (default Spanish voice) |
yf_emma | Young female - Emma |
Kokoro voices never contain hyphens in their names. This is used by the TTS manager to distinguish them from Sherpa-ONNX voices (see
tts_manager.py:22).Adding Sherpa-ONNX Voice Packs
Expand language support by adding Piper-compatible Sherpa-ONNX voice packs for French, Italian, German, Portuguese, and more.Download a voice pack
Browse available voices at huggingface.co/csukuangfj.Download these files from the voice pack repository:
- The
.onnxmodel file (e.g.,es_AR-daniela-high.onnx) tokens.txtespeak-ng-data/directory
Voice Scanner Auto-Detection
On startup, the voice scanner automatically detects installed voices:Detection Criteria
The scanner identifies Sherpa-ONNX voice packs by checking for:- At least one
.onnxfile in the folder - An
espeak-ng-data/subdirectory
voice_scanner.py:55-67:
Voice Configuration Storage
Classifications are saved tovoices/voices_config.json so you’re only prompted once per voice pack:
Language Classification for New Voices
When a new Sherpa voice is detected, the app shows a one-time dialog asking you to assign it to a language category.Why is classification needed?
Why is classification needed?
The TTS manager needs to know which language setting should activate each voice. This allows the app to automatically switch voices when you change the language in Settings.
What if I classify a voice incorrectly?
What if I classify a voice incorrectly?
Edit
voices/voices_config.json manually and change the language assignment, then restart the app.Classification Flow
Fromvoice_scanner.py:130-142:
Voice Selection
Choose your active voice from the top dropdown menu in the main interface. The list includes:- All 54 built-in Kokoro voices
- Any installed Sherpa-ONNX voice packs (classified by language)
english_voice: Default voice for English (default:"af_bella")spanish_voice: Default voice for Spanish (default:"ef_dora")
preferences.py:34-35 for default voice assignments.