metadata
license: mit
language:
- ar
- cs
- de
- el
- en
- id
- hi
- fa
- fr
- ne
- nl
- 'no'
- sw
- sr
- zh
- vi
- tr
- uk
- ru
- ro
- pt
- pl
- nl
- hu
- es
- cs
pipeline_tag: text-to-speech
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:
Checkout the correct version of the piper repository:
git clone [https://github.com/OHF-Voice/piper1-gpl](https://github.com/OHF-Voice/piper1-gpl) cd piper1-gpl git checkout 113931937cf235fc8all1afd1ca4be209bc6919bc7Apply the necessary patch:
# Ensure 'piper1-gpl.patch' is available git apply piper1-gpl.patchSet up the Python environment and install dependencies:
python3 -m venv .venv source .venv/bin/activate python3 -m pip install -e .[train]Download a Piper checkpoint file (
.ckpt) from Hugging Face: https://huggingface.co/datasets/rhasspy/piper-checkpointsInstall the PNNX model converter:
pip install -U pnnxObtain the
export_ncnn.pyscript.Run the conversion script on your checkpoint file:
# Replace with your actual file python export_ncnn.py (language code).ckpt (e.g., en.ckpt, fa.ckpt, ...)