File size: 1,975 Bytes
dd922ab
 
 
 
1a30440
 
 
 
 
 
 
dd922ab
 
cf52fb3
dd922ab
 
 
 
 
1a30440
d3890e7
d6bec59
 
 
 
d3890e7
3fc38e1
 
f0aee98
 
d3890e7
 
 
 
 
 
 
9b565b8
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
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.