File size: 1,551 Bytes
de4bb6a 9f210d6 de4bb6a fa768b4 de4bb6a d5c8e51 9f210d6 d5c8e51 de4bb6a d5c8e51 de4bb6a 62a466d de4bb6a d5c8e51 9f210d6 58b45d4 9f210d6 58b45d4 9f210d6 fa768b4 d5c8e51 9f210d6 66ff0b1 d5c8e51 9f210d6 de4bb6a fa768b4 9f210d6 d5c8e51 9f210d6 de4bb6a 9f210d6 | 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 | ---
language:
- vi
pipeline_tag: text-to-speech
tags:
- kokoro
- vietnamese
- text-to-speech
- onnx
license: apache-2.0
---
# Kokoro Vietnamese
Fine-tuned Vietnamese Kokoro TTS artifacts.
## Files
- `kokoro_vi.pth`: PyTorch Kokoro `KModel` checkpoint for inference.
- `kokoro_vi.onnx`: ONNX Runtime export of the acoustic model.
- `kokoro_vi_voicepack.pt`: default Vietnamese voicepack.
- `config.json`: Kokoro config/vocab used by both PyTorch and ONNX inference.
- `voicepacks/*.pt`: additional Vietnamese voicepacks.
## Install
```bash
git clone https://github.com/iamdinhthuan/Kokoro-Vietnamese.git
cd Kokoro-Vietnamese
pip install -e .
```
For ONNX Runtime:
```bash
pip install -e ".[onnx]"
```
## PyTorch Inference
```bash
kokoro-vietnamese \
--text "Xin chào, hôm nay tôi đang kiểm tra giọng đọc tiếng Việt." \
--output outputs/sample.wav \
--voice diem_trinh \
--device cuda
```
## ONNX Runtime Inference
```bash
kokoro-vietnamese-onnx \
--text "Tường nhà khách đã được sơn lại." \
--output outputs/onnx.wav \
--device cpu \
--print-phonemes
```
The ONNX CLI downloads `kokoro_vi.onnx`, `kokoro_vi_voicepack.pt`, and
`config.json` from this repository when local paths are not provided. Install
`onnxruntime-gpu` and pass `--device cuda` to use CUDAExecutionProvider when
available.
## Export ONNX Yourself
```bash
kokoro-vietnamese-export-onnx \
--output outputs/kokoro_vi.onnx
```
Vietnamese G2P is handled by `vig2p`, matching the GitHub inference and
training code.
|