Add C++ support for MatchaTTS models not from icefall. (#1834)

This commit is contained in:
Fangjun Kuang
2025-02-10 15:38:29 +08:00
committed by GitHub
parent 7d62ccf1fe
commit 9559a10bd3
5 changed files with 61 additions and 7 deletions

View File

@@ -43,6 +43,28 @@ for sid in $(seq 0 10); do
done
rm -rf kokoro-en-v0_19
log "------------------------------------------------------------"
log "matcha-tts-fa_en-male"
log "------------------------------------------------------------"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-tts-fa_en-male.tar.bz2
tar xvf matcha-tts-fa_en-male.tar.bz2
rm matcha-tts-fa_en-male.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
$EXE \
--matcha-acoustic-model=./matcha-tts-fa_en-male/model.onnx \
--matcha-vocoder=./hifigan_v2.onnx \
--matcha-tokens=./matcha-tts-fa_en-male/tokens.txt \
--matcha-data-dir=./matcha-tts-fa_en-male/espeak-ng-data \
--output-filename=./tts/test-matcha-fa-en-male.wav \
--num-threads=2 \
"How are you doing today? این یک نمونه ی تست فارسی است. This is a test."
rm -rf matcha-tts-fa_en-male
rm hifigan_v2.onnx
ls -lh tts/*.wav
log "------------------------------------------------------------"
log "matcha-icefall-en_US-ljspeech"
log "------------------------------------------------------------"
@@ -64,6 +86,7 @@ $EXE \
rm hifigan_v2.onnx
rm -rf matcha-icefall-en_US-ljspeech
ls -lh tts/*.wav
log "------------------------------------------------------------"
log "matcha-icefall-zh-baker"