Update README.md
Browse files## Guidelines for Converting Piper ONNX Model
**References:**
* https://github.com/nihui/ncnn-android-piper
* https://github.com/OHF-Voice/piper1-gpl
* https://huggingface.co/datasets/rhasspy/piper-checkpoints
**Steps to convert Piper checkpoints to NCNN models:**
1. **Checkout the correct version of the piper repository:**
```bash
git clone [https://github.com/OHF-Voice/piper1-gpl](https://github.com/OHF-Voice/piper1-gpl)
cd piper1-gpl
git checkout 113931937cf235fc8all1afd1ca4be209bc6919bc7
```
2. **Apply the necessary patch:**
```bash
# Ensure 'piper1-gpl.patch' is available
git apply piper1-gpl.patch
```
3. **Set up the Python environment and install dependencies:**
```bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -e .[train]
```
4. **Download a Piper checkpoint file (`.ckpt`) from Hugging Face:**
https://huggingface.co/datasets/rhasspy/piper-checkpoints
5. **Install the PNNX model converter:**
```bash
pip install -U pnnx
```
6. **Obtain the `export_ncnn.py` script.**
7. **Run the conversion script on your checkpoint file:**
```bash
# Replace with your actual file
python export_ncnn.py (language code).ckpt (e.g., en.ckpt, fa.ckpt, ...)
```
|
@@ -1,3 +1,26 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- id
|
| 6 |
+
- hi
|
| 7 |
+
- fr
|
| 8 |
+
- ar
|
| 9 |
+
- ne
|
| 10 |
+
- 'no'
|
| 11 |
+
- sw
|
| 12 |
+
- sr
|
| 13 |
+
- zh
|
| 14 |
+
- vi
|
| 15 |
+
- tr
|
| 16 |
+
- uk
|
| 17 |
+
- ru
|
| 18 |
+
- ro
|
| 19 |
+
- pt
|
| 20 |
+
- pl
|
| 21 |
+
- nl
|
| 22 |
+
- hu
|
| 23 |
+
- fa
|
| 24 |
+
- es
|
| 25 |
+
- cs
|
| 26 |
+
---
|