This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex-mr_series-sherpa-onnx/.github/scripts/test-online-punctuation.sh
2024-09-30 11:33:15 +08:00

45 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -ex
echo "TODO(fangjun): Skip this test since the sanitizer test is failed. We need to fix it"
exit 0
log() {
# This function is from espnet
local fname=${BASH_SOURCE[1]##*/}
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
}
echo "EXE is $EXE"
echo "PATH: $PATH"
which $EXE
log "------------------------------------------------------------"
log "Download the punctuation model "
log "------------------------------------------------------------"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
tar xvf sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
rm sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
repo=sherpa-onnx-online-punct-en-2024-08-06
ls -lh $repo
for m in model.onnx model.int8.onnx; do
$EXE \
--debug=1 \
--cnn-bilstm=$repo/$m \
--bpe-vocab=$repo/bpe.vocab \
"How are you i am fine thank you"
$EXE \
--debug=1 \
--cnn-bilstm=$repo/$m \
--bpe-vocab=$repo/bpe.vocab \
"The African blogosphere is rapidly expanding bringing more voices online in the form of commentaries opinions analyses rants and poetry"
done
rm -rf $repo