test exported sense voice models (#1147)

This commit is contained in:
Fangjun Kuang
2024-07-18 12:12:44 +08:00
committed by GitHub
parent 346f419f39
commit 3bae5c3fe5
3 changed files with 263 additions and 0 deletions

View File

@@ -35,3 +35,28 @@ echo "pwd: $PWD"
./show-info.py
ls -lh
# Download test wavs
curl -SL -O https://huggingface.co/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve/main/test_wavs/en.wav
curl -SL -O https://huggingface.co/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve/main/test_wavs/zh.wav
curl -SL -O https://huggingface.co/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve/main/test_wavs/ja.wav
curl -SL -O https://huggingface.co/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve/main/test_wavs/ko.wav
curl -SL -O https://huggingface.co/csukuangfj/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17/resolve/main/test_wavs/yue.wav
for m in model.onnx model.int8.onnx; do
for w in en zh ja ko yue; do
echo "----------test $m $w.wav----------"
echo "without inverse text normalization, lang auto"
./test.py --model $m --tokens ./tokens.txt --wav $w.wav --use-itn 0
echo "with inverse text normalization, lang auto"
./test.py --model $m --tokens ./tokens.txt --wav $w.wav --use-itn 1
echo "without inverse text normalization, lang $w"
./test.py --model $m --tokens ./tokens.txt --wav $w.wav --use-itn 0 --lang $w
echo "with inverse text normalization, lang $w"
./test.py --model $m --tokens ./tokens.txt --wav $w.wav --use-itn 1 --lang $w
done
done