Introduction
This repository hosts the Kokoro model for the React Native Executorch library. It can perform speech synthesis in 8 different languages, including fine-tuned Polish and German.
The models support input shape dynamism and cover the input range of 1 up to 128 tokens.
Additionally, the repository contains essential resources for G2P (grapheme-to-phoneme) preprocessing required by the Kokoro model, including simple word-by-word phonemization models (also in ExecuTorch format).
If you'd like to run these models in your own ExecuTorch runtime, refer to the official documentation for setup instructions.
Compatibility
These models were exported using v1.0.0 version of ExecuTorch and no forward compatibility is guaranteed. Older versions of the runtime may not work with these files.
The models are intended to be used within the React Native ExecuTorch package. If you want to use them outside the package, make sure your runtime is compatible with the ExecuTorch version used to export the .pte files and follow the example script to run the models.
Repository Structure
.
βββ config.json # Backend-agnostic model manifest
βββ phonemizer/ # G2P data files + per-language phonemizer models
βββ voices/ # Pre-computed speaker embeddings
βββ xnnpack/ # XNNPACK-exported .pte files, one directory per model variant
βββ standard/
β βββ config.json
β βββ duration_predictor_std_xnnpack_fp32.pte
β βββ synthesizer_std_xnnpack_fp32.pte
βββ german/
β βββ config.json
β βββ duration_predictor_de_xnnpack_fp32.pte
β βββ synthesizer_de_xnnpack_fp32.pte
βββ polish/
βββ config.json
βββ duration_predictor_pl_xnnpack_fp32.pte
βββ synthesizer_pl_xnnpack_fp32.pte
phonemizer- data files required by the Phonemis package - responsible for input preprocessing part of React Native ExecuTorch Kokoro pipeline.voices- a collection of pre-computed speaker embeddings used by the Kokoro model to synthesize speech with specific vocal characteristics.xnnpack- exported, XNNPACK-optimized Kokoro runtime modules. Each variant directory ships aconfig.jsonmanifest describing its.ptefiles and their method signatures.
Each variant is composed of two sub-models that run sequentially:
- Duration predictor β predicts per-token durations and the prosody features
d. Exported as a bundled program exposingforward_32,forward_64andforward_128, one method per padded token bucket. - Synthesizer β encodes text, predicts F0/N and decodes the waveform. Exported with dynamic shapes behind a single
forwardmethod.
- Downloads last month
- 108,894