File size: 2,384 Bytes
e990dfa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Kokoro-82M ONNX Runtime Inference

![Downloads](https://img.shields.io/github/downloads/yakhyo/kokoro-82m-onnx/total)
[![GitHub Repo stars](https://img.shields.io/github/stars/yakhyo/kokoro-82m-onnx)](https://github.com/yakhyo/kokoro-82m-onnx/stargazers)
[![GitHub Repository](https://img.shields.io/badge/GitHub-Repository-blue?logo=github)](https://github.com/yakhyo/kokoro-82m-onnx)

This repository contains minimal code and resources for inference using the **Kokoro-82M** model. The repository supports inference using **ONNX Runtime**.

<table>
  <tr>
    <td>Machine learning models rely on large datasets and complex algorithms to identify patterns and make predictions.</td>
    <td>Did you know that honey never spoils? Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still edible!</td>
  </tr>
  <tr>
    <td align="center">
       <video controls autoplay loop src="https://github.com/user-attachments/assets/a8e9bfb7-777a-4b44-901c-c79c39c02c6f" ></video>
    </td>
    <td align="center">
      <video controls autoplay loop src="https://github.com/user-attachments/assets/358723ad-c0ab-44a3-90cc-64d89c042c9a" ></video>
    </td>
  </tr>
</table>

## Features

- **ONNX Runtime Inference**: Kokoro-82M (v0_19) Minimal ONNX Runtime Inference code. It supports `en-us` and `en-gb`.

---

## Installation

1. Clone the repository:

   ```bash
   git clone https://github.com/yakhyo/kokoro-82m.git
   cd kokoro-82m
   ```

2. Install dependencies:

   ```bash
   pip install -r requirements.txt
   ```

3. Install `espeak` for text-to-speech functionality:
   Linux:
   ```bash
   apt-get install espeak -y
   ```

---

## Usage

### Download ONNX Model

[click to download](https://github.com/yakhyo/kokoro-82m/releases/download/v0.0.1/kokoro-v0_19.onnx)

### Jupyter Notebook Inference Example

Run inference using the jupyter notebook:

[example.ipynb](example.ipynb)

### CLI Inference

Specify input text and model weights in `inference.py` then run:

```bash
python inference.py
```

### Gradio App

Run below start Gradio App
```bash
python app.py
```
<div>
  <img src="gradio_demo.png", width="100%>
</div>

---

## License

This project is licensed under the [MIT License](LICENSE).
Model weights licensed under the [Apache 2.0](#license)

---

## Acknowledgments

- https://huggingface.co/hexgrad/Kokoro-82M