davidmezzetti
commited on
Commit
·
99cab3d
1
Parent(s):
892917a
Update README
Browse files
README.md
CHANGED
@@ -13,7 +13,7 @@ library_name: txtai
|
|
13 |
|
14 |
# Kokoro Base (82M) Model for ONNX
|
15 |
|
16 |
-
[Kokoro 82M](https://huggingface.co/hexgrad/Kokoro-82M) export to ONNX. This model is the same ONNX file that's in the base repository. The voices file is from [this repository](https://github.com/thewh1teagle/kokoro-onnx/releases/tag/model-files)
|
17 |
|
18 |
## Usage with txtai
|
19 |
|
@@ -79,3 +79,29 @@ outputs = model.run(None, {
|
|
79 |
# Write to file
|
80 |
sf.write("out.wav", outputs[0], 24000)
|
81 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Kokoro Base (82M) Model for ONNX
|
15 |
|
16 |
+
[Kokoro 82M](https://huggingface.co/hexgrad/Kokoro-82M) export to ONNX. This model is the same ONNX file that's in the base repository. The voices file is from [this repository](https://github.com/thewh1teagle/kokoro-onnx/releases/tag/model-files).
|
17 |
|
18 |
## Usage with txtai
|
19 |
|
|
|
79 |
# Write to file
|
80 |
sf.write("out.wav", outputs[0], 24000)
|
81 |
```
|
82 |
+
|
83 |
+
## Speaker reference
|
84 |
+
|
85 |
+
The Kokoro model has a number of built-in speakers.
|
86 |
+
|
87 |
+
When using this model, set a `speaker` id from the reference table below.
|
88 |
+
|
89 |
+
| SPEAKER | GENDER | NATIONALITY | EXAMPLE |
|
90 |
+
|:------------|:---------|:---------------|:-----------------|
|
91 |
+
| af | F | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/af.mp3) |
|
92 |
+
| af_bella | F | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/af_bella.mp3) |
|
93 |
+
| af_nicole | F | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/af_nicole.mp3) |
|
94 |
+
| af_sarah | F | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/af_sarah.mp3) |
|
95 |
+
| af_sky | F | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/af_sky.mp3) |
|
96 |
+
| am_adam | M | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/am_adam.mp3) |
|
97 |
+
| af_michael | M | American | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/am_michael.mp3) |
|
98 |
+
| bf_emma | F | British | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/bf_emma.mp3) |
|
99 |
+
| bf_isabella | F | British | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/bf_isabella.mp3) |
|
100 |
+
| bm_george | M | British | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/bm_george.mp3) |
|
101 |
+
| bm_lewis | M | British | [Link](https://huggingface.co/NeuML/kokoro-base-onnx/resolve/main/examples/bm_lewis.mp3) |
|
102 |
+
|
103 |
+
The following shows an example on how to set a speaker id when using txtai
|
104 |
+
|
105 |
+
```python
|
106 |
+
speech, rate = tts("Say something here", speaker="af_sky")
|
107 |
+
```
|