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

@@ -14,14 +14,14 @@ if [ ! -f ./matcha-icefall-en_US-ljspeech/model-steps-3.onnx ]; then
rm matcha-icefall-en_US-ljspeech.tar.bz2
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
dart run \
./bin/matcha-en.dart \
--acoustic-model ./matcha-icefall-en_US-ljspeech/model-steps-3.onnx \
--vocoder ./hifigan_v2.onnx \
--vocoder ./vocos-22khz-univ.onnx \
--tokens ./matcha-icefall-en_US-ljspeech/tokens.txt \
--data-dir ./matcha-icefall-en_US-ljspeech/espeak-ng-data \
--sid 0 \

View File

@@ -13,14 +13,14 @@ if [ ! -f ./matcha-icefall-zh-baker/model-steps-3.onnx ]; then
rm matcha-icefall-zh-baker.tar.bz2
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
dart run \
./bin/matcha-zh.dart \
--acoustic-model ./matcha-icefall-zh-baker/model-steps-3.onnx \
--vocoder ./hifigan_v2.onnx \
--vocoder ./vocos-22khz-univ.onnx \
--lexicon ./matcha-icefall-zh-baker/lexicon.txt \
--tokens ./matcha-icefall-zh-baker/tokens.txt \
--dict-dir ./matcha-icefall-zh-baker/dict \
@@ -33,7 +33,7 @@ dart run \
dart run \
./bin/matcha-zh.dart \
--acoustic-model ./matcha-icefall-zh-baker/model-steps-3.onnx \
--vocoder ./hifigan_v2.onnx \
--vocoder ./vocos-22khz-univ.onnx \
--lexicon ./matcha-icefall-zh-baker/lexicon.txt \
--tokens ./matcha-icefall-zh-baker/tokens.txt \
--dict-dir ./matcha-icefall-zh-baker/dict \