Add C++ runtime for vocos (#2014)

This commit is contained in:
Fangjun Kuang
2025-03-17 17:05:15 +08:00
committed by GitHub
parent 623cdc9eec
commit 0aacf02dd8
62 changed files with 558 additions and 162 deletions

View File

@@ -20,8 +20,8 @@ if [ ! -f male/tokens.txt ]; then
curl -SL --output male/tokens.txt https://huggingface.co/mah92/Musa-FA_EN-Matcha-TTS-Model/resolve/main/tokens_sherpa_with_fa.txt
fi
if [ ! -f hifigan_v2.onnx ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
if [ ! -f vocos-22khz-univ.onnx ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos-22khz-univ.onnx
fi
if [ ! -f .add-meta-data.done ]; then
@@ -31,14 +31,14 @@ fi
python3 ./test.py \
--am ./female/model.onnx \
--vocoder ./hifigan_v2.onnx \
--vocoder ./vocos-22khz-univ.onnx \
--tokens ./female/tokens.txt \
--text "This is a test. این یک نمونه ی تست فارسی است." \
--out-wav "./female-en-fa.wav"
python3 ./test.py \
--am ./male/model.onnx \
--vocoder ./hifigan_v2.onnx \
--vocoder ./vocos-22khz-univ.onnx \
--tokens ./male/tokens.txt \
--text "This is a test. این یک نمونه ی تست فارسی است." \
--out-wav "./male-en-fa.wav"