| --- |
| license: apache-2.0 |
| language: |
| - en |
| - fr |
| - es |
| - it |
| - pt |
| - de |
| - pl |
| - hi |
| base_model: |
| - hexgrad/Kokoro-82M |
| pipeline_tag: text-to-speech |
| --- |
| |
| ## Introduction |
|
|
| This repository hosts the [Kokoro](https://huggingface.co/hexgrad/Kokoro-82M) model for the [React Native Executorch](https://www.npmjs.com/package/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 (see **v0.9.0** branch) 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](https://pytorch.org/executorch/stable/index.html) 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](https://github.com/NorbertKlockiewicz/kokoro-export/blob/main/demo/inference_example.py) to run the models. |
|
|
| ## Repository Structure |
|
|
| The repository contains 3 main directories: |
| - `phonemizer` - data files required by the [Phonemis](https://github.com/IgorSwat/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. |