kokoro
This repository hosts the kokoro models exported for the
React Native ExecuTorch
library as ExecuTorch .pte programs, ready to run on device.
Upstream model: Kokoro
Variants
| Path |
Component |
Backend |
Precision |
coreml/german/duration_predictor_de_coreml_fp32.pte |
duration_predictor |
coreml |
fp32 |
coreml/german/synthesizer_de_coreml_fp32.pte |
synthesizer |
coreml |
fp32 |
coreml/polish/duration_predictor_pl_coreml_fp32.pte |
duration_predictor |
coreml |
fp32 |
coreml/polish/synthesizer_pl_coreml_fp32.pte |
synthesizer |
coreml |
fp32 |
coreml/standard/duration_predictor_std_coreml_fp32.pte |
duration_predictor |
coreml |
fp32 |
coreml/standard/synthesizer_std_coreml_fp32.pte |
synthesizer |
coreml |
fp32 |
xnnpack/german/duration_predictor_de_xnnpack_fp32.pte |
duration_predictor |
xnnpack |
fp32 |
xnnpack/german/synthesizer_de_xnnpack_fp32.pte |
synthesizer |
xnnpack |
fp32 |
xnnpack/polish/duration_predictor_pl_xnnpack_fp32.pte |
duration_predictor |
xnnpack |
fp32 |
xnnpack/polish/synthesizer_pl_xnnpack_fp32.pte |
synthesizer |
xnnpack |
fp32 |
xnnpack/standard/duration_predictor_std_xnnpack_fp32.pte |
duration_predictor |
xnnpack |
fp32 |
xnnpack/standard/synthesizer_std_xnnpack_fp32.pte |
synthesizer |
xnnpack |
fp32 |
Repository structure
config.json 28 B
coreml/german/config.json 2.7 kB
coreml/german/duration_predictor_de_coreml_fp32.pte 64.9 MB
coreml/german/synthesizer_de_coreml_fp32.pte 282 MB
coreml/polish/config.json 2.7 kB
coreml/polish/duration_predictor_pl_coreml_fp32.pte 64.9 MB
coreml/polish/synthesizer_pl_coreml_fp32.pte 282 MB
coreml/standard/config.json 2.7 kB
coreml/standard/duration_predictor_std_coreml_fp32.pte 64.9 MB
coreml/standard/synthesizer_std_coreml_fp32.pte 282 MB
finetunes/kokoro_german_converted.pth 312 MB
finetunes/kokoro_polish_converted.pth 312 MB
phonemizer/de/phonemizer_de.pte 6.8 MB
phonemizer/en-gb/lexicon.json 6.4 MB
phonemizer/en-gb/phonemizer_en_gb.pte 6.8 MB
phonemizer/en-gb/tags.json 2.1 MB
phonemizer/en-us/lexicon.json 6.0 MB
phonemizer/en-us/phonemizer_en_us.pte 6.8 MB
phonemizer/en-us/tags.json 2.1 MB
phonemizer/es/phonemizer_es.pte 6.8 MB
phonemizer/fr/phonemizer_fr.pte 6.8 MB
phonemizer/hi/phonemizer_hi.pte 8.8 MB
phonemizer/it/phonemizer_it.pte 6.8 MB
phonemizer/pl/phonemizer_pl.pte 6.8 MB
phonemizer/pt/phonemizer_pt.pte 6.8 MB
voices/af_heart.bin 510 kB
voices/af_river.bin 510 kB
voices/af_sarah.bin 510 kB
voices/am_adam.bin 510 kB
voices/am_michael.bin 510 kB
voices/am_santa.bin 510 kB
voices/bf_emma.bin 510 kB
voices/bm_daniel.bin 510 kB
voices/df_anna.bin 510 kB
voices/ef_dora.bin 510 kB
voices/em_alex.bin 510 kB
voices/ff_siwis.bin 510 kB
voices/hf_alpha.bin 510 kB
voices/hm_omega.bin 510 kB
voices/hm_psi.bin 510 kB
voices/if_sara.bin 510 kB
voices/im_nicola.bin 510 kB
voices/jm_kumo.bin 510 kB
voices/pf_dora.bin 510 kB
voices/pm_mateusz.bin 510 kB
voices/pm_santa.bin 510 kB
xnnpack/german/config.json 4.7 kB
xnnpack/german/duration_predictor_de_xnnpack_fp32.pte 56.6 MB
xnnpack/german/synthesizer_de_xnnpack_fp32.pte 260 MB
xnnpack/polish/config.json 4.7 kB
xnnpack/polish/duration_predictor_pl_xnnpack_fp32.pte 56.6 MB
xnnpack/polish/synthesizer_pl_xnnpack_fp32.pte 260 MB
xnnpack/standard/config.json 4.7 kB
xnnpack/standard/duration_predictor_std_xnnpack_fp32.pte 56.6 MB
xnnpack/standard/synthesizer_std_xnnpack_fp32.pte 260 MB
Compatibility
These files are published for the ExecuTorch v1.4.1 runtime. ExecuTorch
gives no forward compatibility guarantee, so an older runtime may fail to load
them.
To use them in React Native ExecuTorch, pass the model constant shipped in the
library's model registry to the corresponding task pipeline. See the
documentation.
To load these files in your own ExecuTorch runtime, read the
compatibility note
first.
Model details
Kokoro synthesizes speech in 8 languages here, including fine-tuned Polish and
German voices. The synthesizer and duration predictor support input shape
dynamism over a range of 1 to 128 tokens.
Synthesis needs G2P (grapheme-to-phoneme) preprocessing, so this
repository also ships the resources for it, not just the voice models:
phonemizer/ holds the data files for
Phonemis plus per-language
word-by-word phonemizer models, themselves in ExecuTorch format.
voices/ holds the pre-computed speaker embeddings.
xnnpack/ holds one directory per language variant, each with its own
duration predictor and synthesizer.
A worked end-to-end call is in the exporter's
inference example.