This commit is contained in:
Fangjun Kuang 2024-12-18 11:00:11 +08:00
parent 9f5cf16e67
commit ea94c5bb0f

View File

@ -98,19 +98,23 @@ function export_onnx() {
python3 ./matcha/export_onnx_hifigan.py python3 ./matcha/export_onnx_hifigan.py
else else
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-ljspeech-matcha-en-2024-10-28/resolve/main/exp/hifigan_v1.onnx curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-ljspeech-matcha-en-2024-10-28/resolve/main/exp/hifigan_v1.onnx
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-ljspeech-matcha-en-2024-10-28/resolve/main/exp/hifigan_v2.onnx
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-ljspeech-matcha-en-2024-10-28/resolve/main/exp/hifigan_v3.onnx
fi fi
ls -lh *.onnx ls -lh *.onnx
python3 ./matcha/onnx_pretrained.py \ for v in v1 v2 v3; do
--acoustic-model ./model-steps-6.onnx \ python3 ./matcha/onnx_pretrained.py \
--vocoder ./hifigan_v1.onnx \ --acoustic-model ./model-steps-6.onnx \
--tokens ./data/tokens.txt \ --vocoder ./hifigan_$v.onnx \
--input-text "how are you doing?" \ --tokens ./data/tokens.txt \
--output-wav /icefall/generated-matcha-tts-steps-6-v1.wav --input-text "how are you doing?" \
--output-wav /icefall/generated-matcha-tts-steps-6-$v.wav
done
ls -lh /icefall/*.wav ls -lh /icefall/*.wav
soxi /icefall/generated-matcha-tts-steps-6-v1.wav soxi /icefall/generated-matcha-tts-steps-6-*.wav
} }
prepare_data prepare_data