Document full voice registry
Browse files
README.md
CHANGED
|
@@ -1,36 +1,95 @@
|
|
| 1 |
-
---
|
| 2 |
-
language:
|
| 3 |
-
- vi
|
| 4 |
-
pipeline_tag: text-to-speech
|
| 5 |
-
tags:
|
| 6 |
-
- kokoro
|
| 7 |
-
- vietnamese
|
| 8 |
-
- text-to-speech
|
| 9 |
-
license: apache-2.0
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
# Kokoro Vietnamese
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
- `kokoro_vi.pth`
|
| 19 |
-
- `kokoro_vi_voicepack.pt`
|
| 20 |
-
- `
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## Usage
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
```bash
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
--text "Xin chào, hôm nay tôi đang kiểm tra giọng đọc tiếng Việt." \
|
| 34 |
-
--output
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Kokoro Vietnamese
|
| 2 |
|
| 3 |
+
Inference-only project for Vietnamese Kokoro TTS.
|
| 4 |
+
|
| 5 |
+
This repository intentionally does not include finetuning code, datasets,
|
| 6 |
+
training configs, checkpoints, or StyleTTS2. Vietnamese phonemes are generated
|
| 7 |
+
with the PyPI package `vig2p`.
|
| 8 |
+
|
| 9 |
+
## Install
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
pip install -e .
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
For CUDA, install the PyTorch build that matches your machine first.
|
| 16 |
+
|
| 17 |
+
## Model Files
|
| 18 |
|
| 19 |
+
The CLI downloads these files from
|
| 20 |
+
[`contextboxai/Kokoro-Vietnamese`](https://huggingface.co/contextboxai/Kokoro-Vietnamese)
|
| 21 |
+
when local paths are not provided:
|
| 22 |
|
| 23 |
+
- `kokoro_vi.pth`
|
| 24 |
+
- `kokoro_vi_voicepack.pt`
|
| 25 |
+
- `config.json`
|
| 26 |
+
|
| 27 |
+
Named voices:
|
| 28 |
+
|
| 29 |
+
| Voice | HF file |
|
| 30 |
+
| --- | --- |
|
| 31 |
+
| `diem_trinh` | `voicepacks/diem_trinh.pt` |
|
| 32 |
+
| `hung_thinh` | `voicepacks/hung_thinh.pt` |
|
| 33 |
+
| `mai_linh` | `voicepacks/mai_linh.pt` |
|
| 34 |
+
| `mai_loan` | `voicepacks/mai_loan.pt` |
|
| 35 |
+
| `manh_dung` | `voicepacks/manh_dung.pt` |
|
| 36 |
+
| `my_yen` | `voicepacks/my_yen.pt` |
|
| 37 |
+
| `ngoc_huyen` | `voicepacks/ngoc_huyen.pt` |
|
| 38 |
+
| `phat_tai` | `voicepacks/phat_tai.pt` |
|
| 39 |
+
| `thanh_dat` | `voicepacks/thanh_dat.pt` |
|
| 40 |
+
| `thuc_trinh` | `voicepacks/thuc_trinh.pt` |
|
| 41 |
+
| `tuan_ngoc` | `voicepacks/tuan_ngoc.pt` |
|
| 42 |
+
| `storyvert` | `voicepacks/storyvert.pt` |
|
| 43 |
+
| `duc_an` | `voicepacks/duc_an.pt` |
|
| 44 |
+
| `duc_duy` | `voicepacks/duc_duy.pt` |
|
| 45 |
|
| 46 |
## Usage
|
| 47 |
|
| 48 |
+
```bash
|
| 49 |
+
kokoro-vietnamese \
|
| 50 |
+
--text "Tường nhà khách." \
|
| 51 |
+
--output outputs/sample.wav \
|
| 52 |
+
--device cuda \
|
| 53 |
+
--print-phonemes
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
List voices:
|
| 57 |
|
| 58 |
```bash
|
| 59 |
+
kokoro-vietnamese --list-voices
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
Or run as a module:
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
python -m kokoro_vietnamese \
|
| 66 |
--text "Xin chào, hôm nay tôi đang kiểm tra giọng đọc tiếng Việt." \
|
| 67 |
+
--output outputs/sample.wav
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
Use a different voicepack:
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
kokoro-vietnamese \
|
| 74 |
+
--text "Xin chào." \
|
| 75 |
+
--voice mai_linh \
|
| 76 |
+
--output outputs/mai_linh.wav
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Batch mode, one utterance per line:
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
kokoro-vietnamese \
|
| 83 |
+
--batch-file texts.txt \
|
| 84 |
+
--voice diem_trinh \
|
| 85 |
+
--output-dir outputs/batch
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Python API
|
| 89 |
+
|
| 90 |
+
```python
|
| 91 |
+
from kokoro_vietnamese import KokoroVietnamese
|
| 92 |
+
|
| 93 |
+
tts = KokoroVietnamese(device="cuda")
|
| 94 |
+
audio, phonemes = tts.synthesize("Tường nhà khách.")
|
| 95 |
```
|