Jingzhao Ou
Committed by GitHub

Added streaming conformer test (#150)

@@ -209,3 +209,46 @@ if [ $EXE == "sherpa-onnx-ffmpeg" ]; then @@ -209,3 +209,46 @@ if [ $EXE == "sherpa-onnx-ffmpeg" ]; then
209 fi 209 fi
210 210
211 rm -rf $repo 211 rm -rf $repo
  212 +
  213 +log "------------------------------------------------------------"
  214 +log "Run streaming Conformer transducer (English)"
  215 +log "------------------------------------------------------------"
  216 +
  217 +repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-conformer-en-2023-05-09
  218 +log "Start testing ${repo_url}"
  219 +repo=$(basename $repo_url)
  220 +log "Download pretrained model and test-data from $repo_url"
  221 +
  222 +GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
  223 +pushd $repo
  224 +git lfs pull --include "*.onnx"
  225 +ls -lh *.onnx
  226 +popd
  227 +
  228 +waves=(
  229 +$repo/test_wavs/0.wav
  230 +$repo/test_wavs/1.wav
  231 +$repo/test_wavs/2.wav
  232 +)
  233 +
  234 +for wave in ${waves[@]}; do
  235 + time $EXE \
  236 + $repo/tokens.txt \
  237 + $repo/encoder-epoch-99-avg-1.onnx \
  238 + $repo/decoder-epoch-99-avg-1.onnx \
  239 + $repo/joiner-epoch-99-avg-1.onnx \
  240 + $wave \
  241 + 2
  242 +done
  243 +
  244 +for wave in ${waves[@]}; do
  245 + time $EXE \
  246 + $repo/tokens.txt \
  247 + $repo/encoder-epoch-99-avg-1.int8.onnx \
  248 + $repo/decoder-epoch-99-avg-1.int8.onnx \
  249 + $repo/joiner-epoch-99-avg-1.int8.onnx \
  250 + $wave \
  251 + 2
  252 +done
  253 +
  254 +rm -rf $repo