Add HLG decoding for streaming CTC models (#731)
This commit is contained in:
22
.github/scripts/test-online-ctc.sh
vendored
22
.github/scripts/test-online-ctc.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
log() {
|
||||
# This function is from espnet
|
||||
@@ -13,6 +13,26 @@ echo "PATH: $PATH"
|
||||
|
||||
which $EXE
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Run streaming Zipformer2 CTC HLG decoding "
|
||||
log "------------------------------------------------------------"
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2
|
||||
rm sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2
|
||||
repo=$PWD/sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18
|
||||
ls -lh $repo
|
||||
echo "pwd: $PWD"
|
||||
|
||||
$EXE \
|
||||
--zipformer2-ctc-model=$repo/ctc-epoch-30-avg-3-chunk-16-left-128.int8.onnx \
|
||||
--ctc-graph=$repo/HLG.fst \
|
||||
--tokens=$repo/tokens.txt \
|
||||
$repo/test_wavs/0.wav \
|
||||
$repo/test_wavs/1.wav \
|
||||
$repo/test_wavs/8k.wav
|
||||
|
||||
rm -rf sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Run streaming Zipformer2 CTC "
|
||||
log "------------------------------------------------------------"
|
||||
|
||||
Reference in New Issue
Block a user