Fix CI tests. (#898)

This commit is contained in:
Fangjun Kuang
2024-05-21 20:37:29 +08:00
committed by GitHub
parent fdcae56a14
commit b445956675
58 changed files with 345 additions and 354 deletions

View File

@@ -124,15 +124,13 @@ sherpa-onnx-en-wenet-librispeech
# sherpa-onnx-en-wenet-gigaspeech # sherpa-onnx-en-wenet-gigaspeech
) )
for name in ${wenet_models[@]}; do for name in ${wenet_models[@]}; do
repo_url=https://huggingface.co/csukuangfj/$name repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/$name.tar.bz2
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url) repo=$name
log "Download pretrained model and test-data from $repo_url" log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url curl -SL -O $repo_url
pushd $repo tar xvf $name.tar.bz2
git lfs pull --include "*.onnx" rm $name.tar.bz2
ls -lh *.onnx
popd
log "test float32 models" log "test float32 models"
time $EXE \ time $EXE \
@@ -156,16 +154,13 @@ done
log "------------------------------------------------------------" log "------------------------------------------------------------"
log "Run tdnn yesno (Hebrew)" log "Run tdnn yesno (Hebrew)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $url
repo=$(basename $repo_url) tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-tdnn-yesno.tar.bz2
log "Start testing ${url}"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url repo=sherpa-onnx-tdnn-yesno
pushd $repo log "Download pretrained model and test-data from $url"
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
log "test float32 models" log "test float32 models"
time $EXE \ time $EXE \
@@ -201,17 +196,14 @@ log "------------------------------------------------------------"
log "Run Citrinet (stt_en_citrinet_512, English)" log "Run Citrinet (stt_en_citrinet_512, English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=http://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-citrinet-512 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
rm sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url) repo=sherpa-onnx-nemo-ctc-en-citrinet-512
log "Download pretrained model and test-data from $repo_url" log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \
--nemo-ctc-model=$repo/model.onnx \ --nemo-ctc-model=$repo/model.onnx \
@@ -233,18 +225,14 @@ rm -rf $repo
log "------------------------------------------------------------" log "------------------------------------------------------------"
log "Run Librispeech zipformer CTC H/HL/HLG decoding (English) " log "Run Librispeech zipformer CTC H/HL/HLG decoding (English) "
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-ctc-en-2023-10-02 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
curl -SL -O $repo_url
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url) tar xvf sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
rm sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
repo=sherpa-onnx-zipformer-ctc-en-2023-10-02
log "Download pretrained model and test-data from $repo_url" log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
git lfs pull --include "*.fst"
ls -lh
popd
graphs=( graphs=(
$repo/H.fst $repo/H.fst
$repo/HL.fst $repo/HL.fst

View File

@@ -118,17 +118,14 @@ log "------------------------------------------------------------"
log "Run Conformer transducer (English)" log "Run Conformer transducer (English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-conformer-en-2023-03-18 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-conformer-en-2023-03-18.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-conformer-en-2023-03-18.tar.bz2
rm sherpa-onnx-conformer-en-2023-03-18.tar.bz2
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url) repo=sherpa-onnx-conformer-en-2023-03-18
log "Download pretrained model and test-data from $repo_url" log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \
--encoder=$repo/encoder-epoch-99-avg-1.onnx \ --encoder=$repo/encoder-epoch-99-avg-1.onnx \
@@ -155,16 +152,12 @@ log "------------------------------------------------------------"
log "Run Zipformer transducer (English)" log "Run Zipformer transducer (English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-03-30 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-03-30.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-zipformer-en-2023-03-30.tar.bz2
rm sherpa-onnx-zipformer-en-2023-03-30.tar.bz2
repo=sherpa-onnx-zipformer-en-2023-03-30
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \
@@ -192,16 +185,12 @@ log "------------------------------------------------------------"
log "Run Paraformer (Chinese)" log "Run Paraformer (Chinese)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
repo=sherpa-onnx-paraformer-zh-2023-03-28
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \
@@ -229,16 +218,13 @@ log "------------------------------------------------------------"
log "Run Paraformer (Chinese) with timestamps" log "Run Paraformer (Chinese) with timestamps"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-09-14 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
repo=sherpa-onnx-paraformer-zh-2023-09-14
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \

View File

@@ -40,15 +40,13 @@ log "------------------------------------------------------------"
log "vits-ljs test" log "vits-ljs test"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/vits-ljs repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-ljs.tar.bz2
curl -SL -O $repo_url
tar xvf vits-ljs.tar.bz2
rm vits-ljs.tar.bz2
repo=vits-ljs
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
$EXE \ $EXE \
--vits-model=$repo/vits-ljs.onnx \ --vits-model=$repo/vits-ljs.onnx \
@@ -65,15 +63,13 @@ log "------------------------------------------------------------"
log "vits-vctk test" log "vits-vctk test"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/vits-vctk repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-vctk.tar.bz2
curl -SL -O $repo_url
tar xvf vits-vctk.tar.bz2
rm vits-vctk.tar.bz2
repo=vits-vctk
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
for sid in 0 10 90; do for sid in 0 10 90; do
$EXE \ $EXE \
@@ -93,15 +89,13 @@ log "------------------------------------------------------------"
log "vits-zh-aishell3" log "vits-zh-aishell3"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/vits-zh-aishell3 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-aishell3.tar.bz2
curl -SL -O $repo_url
tar xvf vits-zh-aishell3.tar.bz2
rm vits-zh-aishell3.tar.bz2
repo=vits-zh-aishell3
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
for sid in 0 10 90; do for sid in 0 10 90; do
$EXE \ $EXE \

View File

@@ -33,17 +33,12 @@ for name in ${names[@]}; do
log "Run $name" log "Run $name"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-whisper-$name repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-$name.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-whisper-$name.tar.bz2
rm sherpa-onnx-whisper-$name.tar.bz2
repo=sherpa-onnx-whisper-$name
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
# git lfs pull --include "*.ort"
ls -lh *.onnx
popd
log "test fp32 onnx" log "test fp32 onnx"

View File

@@ -55,7 +55,7 @@ $EXE \
$repo/test_wavs/1.wav \ $repo/test_wavs/1.wav \
$repo/test_wavs/8k.wav $repo/test_wavs/8k.wav
rm -rf sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18 rm -rf $repo
log "------------------------------------------------------------" log "------------------------------------------------------------"
log "Run streaming Zipformer2 CTC " log "Run streaming Zipformer2 CTC "
@@ -87,28 +87,26 @@ time $EXE \
$repo/test_wavs/DEV_T0000000001.wav \ $repo/test_wavs/DEV_T0000000001.wav \
$repo/test_wavs/DEV_T0000000002.wav $repo/test_wavs/DEV_T0000000002.wav
rm -rf $repo
log "------------------------------------------------------------" log "------------------------------------------------------------"
log "Run streaming Conformer CTC from WeNet" log "Run streaming Conformer CTC from WeNet"
log "------------------------------------------------------------" log "------------------------------------------------------------"
wenet_models=( wenet_models=(
sherpa-onnx-zh-wenet-aishell sherpa-onnx-zh-wenet-aishell
sherpa-onnx-zh-wenet-aishell2 # sherpa-onnx-zh-wenet-aishell2
sherpa-onnx-zh-wenet-wenetspeech # sherpa-onnx-zh-wenet-wenetspeech
sherpa-onnx-zh-wenet-multi-cn # sherpa-onnx-zh-wenet-multi-cn
sherpa-onnx-en-wenet-librispeech sherpa-onnx-en-wenet-librispeech
sherpa-onnx-en-wenet-gigaspeech # sherpa-onnx-en-wenet-gigaspeech
) )
for name in ${wenet_models[@]}; do for name in ${wenet_models[@]}; do
repo_url=https://huggingface.co/csukuangfj/$name repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/$name.tar.bz2
curl -SL -O $repo_url
tar xvf $name.tar.bz2
rm $name.tar.bz2
repo=$name
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
log "test float32 models" log "test float32 models"
time $EXE \ time $EXE \

View File

@@ -19,16 +19,13 @@ log "------------------------------------------------------------"
log "Run streaming Paraformer" log "Run streaming Paraformer"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
repo=sherpa-onnx-streaming-paraformer-bilingual-zh-en
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
time $EXE \ time $EXE \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \

View File

@@ -19,16 +19,13 @@ log "------------------------------------------------------------"
log "Run LSTM transducer (English)" log "Run LSTM transducer (English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-lstm-en-2023-02-17 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-lstm-en-2023-02-17.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-lstm-en-2023-02-17.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-lstm-en-2023-02-17.tar.bz2
repo=sherpa-onnx-lstm-en-2023-02-17
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
waves=( waves=(
$repo/test_wavs/0.wav $repo/test_wavs/0.wav
@@ -62,16 +59,13 @@ log "------------------------------------------------------------"
log "Run LSTM transducer (Chinese)" log "Run LSTM transducer (Chinese)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-lstm-zh-2023-02-20 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-lstm-zh-2023-02-20.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-lstm-zh-2023-02-20.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-lstm-zh-2023-02-20.tar.bz2
repo=sherpa-onnx-lstm-zh-2023-02-20
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
waves=( waves=(
$repo/test_wavs/0.wav $repo/test_wavs/0.wav
@@ -105,16 +99,13 @@ log "------------------------------------------------------------"
log "Run streaming Zipformer transducer (English)" log "Run streaming Zipformer transducer (English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-02-21 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-02-21.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-streaming-zipformer-en-2023-02-21.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-streaming-zipformer-en-2023-02-21.tar.bz2
repo=sherpa-onnx-streaming-zipformer-en-2023-02-21
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
waves=( waves=(
$repo/test_wavs/0.wav $repo/test_wavs/0.wav
@@ -150,16 +141,13 @@ log "------------------------------------------------------------"
log "Run streaming Zipformer transducer (Bilingual, Chinese + English)" log "Run streaming Zipformer transducer (Bilingual, Chinese + English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
repo=sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
waves=( waves=(
$repo/test_wavs/0.wav $repo/test_wavs/0.wav
@@ -216,16 +204,13 @@ log "------------------------------------------------------------"
log "Run streaming Conformer transducer (English)" log "Run streaming Conformer transducer (English)"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-conformer-en-2023-05-09 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-conformer-en-2023-05-09.tar.bz2
log "Start testing ${repo_url}" curl -SL -O $repo_url
repo=$(basename $repo_url) tar xvf sherpa-onnx-streaming-conformer-en-2023-05-09.tar.bz2
log "Download pretrained model and test-data from $repo_url" rm sherpa-onnx-streaming-conformer-en-2023-05-09.tar.bz2
repo=sherpa-onnx-streaming-conformer-en-2023-05-09
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url log "Start testing ${repo_url}"
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
waves=( waves=(
$repo/test_wavs/0.wav $repo/test_wavs/0.wav

View File

@@ -102,20 +102,16 @@ wenet_models=(
# sherpa-onnx-zh-wenet-wenetspeech # sherpa-onnx-zh-wenet-wenetspeech
# sherpa-onnx-zh-wenet-multi-cn # sherpa-onnx-zh-wenet-multi-cn
sherpa-onnx-en-wenet-librispeech sherpa-onnx-en-wenet-librispeech
sherpa-onnx-en-wenet-gigaspeech # sherpa-onnx-en-wenet-gigaspeech
) )
for name in ${wenet_models[@]}; do for name in ${wenet_models[@]}; do
repo_url=https://huggingface.co/csukuangfj/$name repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/$name.tar.bz2
curl -SL -O $repo_url
tar xvf $name.tar.bz2
rm $name.tar.bz2
repo=$name
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$dir/$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url"
pushd $dir
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
cd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd
python3 ./python-api-examples/offline-decode-files.py \ python3 ./python-api-examples/offline-decode-files.py \
--tokens=$repo/tokens.txt \ --tokens=$repo/tokens.txt \
@@ -206,16 +202,14 @@ log "Test streaming transducer models"
if [[ x$OS != x'windows-latest' ]]; then if [[ x$OS != x'windows-latest' ]]; then
echo "OS: $OS" echo "OS: $OS"
pushd $dir pushd $dir
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
repo=sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$dir/$(basename $repo_url) repo=$dir/$repo
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
cd $repo
git lfs pull --include "*.onnx"
popd
python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)" python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
sherpa_onnx_version=$(python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)") sherpa_onnx_version=$(python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)")
@@ -255,15 +249,14 @@ fi
log "Test non-streaming transducer models" log "Test non-streaming transducer models"
pushd $dir pushd $dir
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-04-01 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
log "Start testing ${repo_url}"
repo=$dir/$(basename $repo_url)
log "Download pretrained model and test-data from $repo_url" log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url curl -SL -O $repo_url
cd $repo tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
repo=$dir/sherpa-onnx-zipformer-en-2023-04-01
popd popd
ls -lh $repo ls -lh $repo
@@ -295,16 +288,13 @@ log "Test non-streaming paraformer models"
if [[ x$OS != x'windows-latest' ]]; then if [[ x$OS != x'windows-latest' ]]; then
echo "OS: $OS" echo "OS: $OS"
pushd $dir pushd $dir
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$dir/$(basename $repo_url) repo=$dir/sherpa-onnx-paraformer-zh-2023-03-28
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
cd $repo
git lfs pull --include "*.onnx"
popd
ls -lh $repo ls -lh $repo
@@ -332,16 +322,13 @@ fi
log "Test non-streaming NeMo CTC models" log "Test non-streaming NeMo CTC models"
pushd $dir pushd $dir
repo_url=http://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-citrinet-512 repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
rm sherpa-onnx-nemo-ctc-en-citrinet-512.tar.bz2
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$dir/$(basename $repo_url) repo=$dir/sherpa-onnx-nemo-ctc-en-citrinet-512
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
cd $repo
git lfs pull --include "*.onnx"
popd
ls -lh $repo ls -lh $repo

View File

@@ -73,18 +73,13 @@ for name in ${names[@]}; do
log "------------------------------------------------------------" log "------------------------------------------------------------"
log "Run $name" log "Run $name"
log "------------------------------------------------------------" log "------------------------------------------------------------"
repo_url=https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-$name.tar.bz2
curl -SL -O $repo_url
tar xvf sherpa-onnx-whisper-$name.tar.bz2
rm sherpa-onnx-whisper-$name.tar.bz2
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-whisper-$name
log "Start testing ${repo_url}" log "Start testing ${repo_url}"
repo=$(basename $repo_url) repo=sherpa-onnx-whisper-$name
log "Download pretrained model and test-data from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
# git lfs pull --include "*.ort"
ls -lh *.onnx
popd
for wav in ${waves[@]}; do for wav in ${waves[@]}; do
log "test fp32 onnx" log "test fp32 onnx"

View File

@@ -192,6 +192,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -183,6 +183,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -120,6 +120,7 @@ jobs:
ls -lh ls -lh
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -155,6 +155,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -159,6 +159,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -159,6 +159,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -155,6 +155,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface

View File

@@ -92,6 +92,7 @@ jobs:
shell: bash shell: bash
run: | run: |
git lfs install git lfs install
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/arm-linux-gcc git clone https://huggingface.co/csukuangfj/arm-linux-gcc
ls -lh arm-linux-gcc ls -lh arm-linux-gcc

View File

@@ -93,6 +93,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -92,6 +92,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -62,6 +62,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -79,6 +79,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -61,6 +61,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -62,6 +62,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface
@@ -91,6 +92,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface cd huggingface

View File

@@ -134,6 +134,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -65,6 +65,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
d=sherpa-onnx-ced-$m-audio-tagging-2024-04-19 d=sherpa-onnx-ced-$m-audio-tagging-2024-04-19
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/k2-fsa/$d huggingface git clone https://huggingface.co/k2-fsa/$d huggingface
mv -v $d/* huggingface mv -v $d/* huggingface
cd huggingface cd huggingface

View File

@@ -47,6 +47,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell huggingface
cd huggingface cd huggingface
@@ -88,6 +89,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell2 huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell2 huggingface
cd huggingface cd huggingface
@@ -129,6 +131,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-multi-cn huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-multi-cn huggingface
cd huggingface cd huggingface
@@ -170,6 +173,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech huggingface
cd huggingface cd huggingface
@@ -211,6 +215,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-librispeech huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-librispeech huggingface
cd huggingface cd huggingface
@@ -253,6 +258,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-gigaspeech huggingface git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-gigaspeech huggingface
cd huggingface cd huggingface

View File

@@ -142,6 +142,8 @@ jobs:
git config --global user.email "csukuangfj@gmail.com" git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-${{ matrix.model }} huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-${{ matrix.model }} huggingface
if [[ $model != medium-aishell ]]; then if [[ $model != medium-aishell ]]; then

View File

@@ -69,6 +69,7 @@ jobs:
run: | run: |
echo "pwd: $PWD" echo "pwd: $PWD"
ls -lh ls -lh
du -h -d1 .
- name: Build sherpa-onnx - name: Build sherpa-onnx
uses: addnab/docker-run-action@v3 uses: addnab/docker-run-action@v3
@@ -109,6 +110,7 @@ jobs:
- name: Display dependencies of sherpa-onnx for linux - name: Display dependencies of sherpa-onnx for linux
shell: bash shell: bash
run: | run: |
du -h -d1 .
sudo chown -R $USER ./build sudo chown -R $USER ./build
ls -lh build/bin ls -lh build/bin
ls -lh build/_deps/onnxruntime-src/lib/ ls -lh build/_deps/onnxruntime-src/lib/
@@ -128,33 +130,70 @@ jobs:
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }} name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
path: install/* path: install/*
- name: Test online CTC - name: Test online transducer
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx export EXE=sherpa-onnx
.github/scripts/test-online-ctc.sh .github/scripts/test-online-transducer.sh
du -h -d1 .
- name: Test offline transducer - name: Test online transducer (C API)
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=decode-file-c-api
.github/scripts/test-online-transducer.sh
du -h -d1 .
- name: Test offline CTC
shell: bash
run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline export EXE=sherpa-onnx-offline
.github/scripts/test-offline-transducer.sh .github/scripts/test-offline-ctc.sh
du -h -d1 .
- name: Test spoken language identification (C++ API) - name: Test spoken language identification (C++ API)
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-language-identification export EXE=sherpa-onnx-offline-language-identification
.github/scripts/test-spoken-language-identification.sh .github/scripts/test-spoken-language-identification.sh
du -h -d1 .
- name: Test online CTC
shell: bash
run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx
.github/scripts/test-online-ctc.sh
du -h -d1 .
- name: Test offline transducer
shell: bash
run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-transducer.sh
du -h -d1 .
- name: Test C API - name: Test C API
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export SLID_EXE=spoken-language-identification-c-api export SLID_EXE=spoken-language-identification-c-api
export SID_EXE=speaker-identification-c-api export SID_EXE=speaker-identification-c-api
@@ -162,87 +201,77 @@ jobs:
export PUNCT_EXE=add-punctuation-c-api export PUNCT_EXE=add-punctuation-c-api
.github/scripts/test-c-api.sh .github/scripts/test-c-api.sh
du -h -d1 .
- name: Test offline CTC
shell: bash
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-ctc.sh
- name: Test offline punctuation - name: Test offline punctuation
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-punctuation export EXE=sherpa-onnx-offline-punctuation
.github/scripts/test-offline-punctuation.sh .github/scripts/test-offline-punctuation.sh
du -h -d1 .
- name: Test Audio tagging - name: Test Audio tagging
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-audio-tagging export EXE=sherpa-onnx-offline-audio-tagging
.github/scripts/test-audio-tagging.sh .github/scripts/test-audio-tagging.sh
du -h -d1 .
- name: Test transducer kws - name: Test transducer kws
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-keyword-spotter export EXE=sherpa-onnx-keyword-spotter
.github/scripts/test-kws.sh .github/scripts/test-kws.sh
du -h -d1 .
- name: Test offline Whisper - name: Test offline Whisper
if: matrix.build_type != 'Debug' if: matrix.build_type != 'Debug'
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline export EXE=sherpa-onnx-offline
readelf -d build/bin/sherpa-onnx-offline readelf -d build/bin/sherpa-onnx-offline
.github/scripts/test-offline-whisper.sh .github/scripts/test-offline-whisper.sh
du -h -d1 .
- name: Test offline TTS - name: Test offline TTS
if: matrix.with_tts == 'ON' if: matrix.with_tts == 'ON'
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-tts export EXE=sherpa-onnx-offline-tts
.github/scripts/test-offline-tts.sh .github/scripts/test-offline-tts.sh
du -h -d1 .
- name: Test online paraformer - name: Test online paraformer
shell: bash shell: bash
run: | run: |
du -h -d1 .
export PATH=$PWD/build/bin:$PATH export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx export EXE=sherpa-onnx
.github/scripts/test-online-paraformer.sh .github/scripts/test-online-paraformer.sh
du -h -d1 .
- name: Test online transducer
shell: bash
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx
.github/scripts/test-online-transducer.sh
- name: Test online transducer (C API)
shell: bash
run: |
export PATH=$PWD/build/bin:$PATH
export EXE=decode-file-c-api
.github/scripts/test-online-transducer.sh
- name: Copy files - name: Copy files
shell: bash shell: bash
if: matrix.build_type == 'Release' if: matrix.build_type == 'Release'
run: | run: |
du -h -d1 .
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
if [[ ${{ matrix.shared_lib }} == 'ON' ]]; then if [[ ${{ matrix.shared_lib }} == 'ON' ]]; then
@@ -265,6 +294,7 @@ jobs:
tree $dst tree $dst
tar cjvf ${dst}.tar.bz2 $dst tar cjvf ${dst}.tar.bz2 $dst
du -h -d1 .
- name: Publish to huggingface - name: Publish to huggingface
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.build_type == 'Release' if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && matrix.build_type == 'Release'
@@ -276,11 +306,14 @@ jobs:
timeout_seconds: 200 timeout_seconds: 200
shell: bash shell: bash
command: | command: |
du -h -d1 .
git config --global user.email "csukuangfj@gmail.com" git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
du -h -d1 .
cd huggingface cd huggingface
git lfs pull git lfs pull
@@ -296,6 +329,7 @@ jobs:
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}" git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
du -h -d1 .
- name: Release pre-compiled binaries and libs for linux x64 - name: Release pre-compiled binaries and libs for linux x64
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release' if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release'

View File

@@ -239,6 +239,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface

View File

@@ -73,10 +73,9 @@ jobs:
if: matrix.model_type == 'transducer' if: matrix.model_type == 'transducer'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
cd sherpa-onnx-zipformer-en-2023-06-26 tar xvf sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \ --encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \
@@ -105,14 +104,13 @@ jobs:
if: matrix.model_type == 'paraformer' && matrix.os != 'windows-latest' if: matrix.model_type == 'paraformer' && matrix.os != 'windows-latest'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd sherpa-onnx-paraformer-bilingual-zh-en tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--paraformer ./sherpa-onnx-paraformer-bilingual-zh-en/model.int8.onnx \ --paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-bilingual-zh-en/tokens.txt & --tokens ./sherpa-onnx-paraformer-zh-2023-03-28/tokens.txt &
echo "sleep 10 seconds to wait the server start" echo "sleep 10 seconds to wait the server start"
sleep 10 sleep 10
@@ -122,25 +120,24 @@ jobs:
shell: bash shell: bash
run: | run: |
python3 ./python-api-examples/offline-websocket-client-decode-files-paralell.py \ python3 ./python-api-examples/offline-websocket-client-decode-files-paralell.py \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/0.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/0.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/1.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/1.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/2.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/2.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/8k.wav ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/8k.wav
python3 ./python-api-examples/offline-websocket-client-decode-files-sequential.py \ python3 ./python-api-examples/offline-websocket-client-decode-files-sequential.py \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/0.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/0.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/1.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/1.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/2.wav \ ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/2.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/8k.wav ./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/8k.wav
- name: Start server for nemo_ctc models - name: Start server for nemo_ctc models
if: matrix.model_type == 'nemo_ctc' if: matrix.model_type == 'nemo_ctc'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd sherpa-onnx-nemo-ctc-en-conformer-medium tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \ --nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \
@@ -167,10 +164,9 @@ jobs:
if: matrix.model_type == 'whisper' if: matrix.model_type == 'whisper'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
cd sherpa-onnx-whisper-tiny.en tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-whisper-tiny.en.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \ --whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \
@@ -198,10 +194,9 @@ jobs:
if: matrix.model_type == 'tdnn' if: matrix.model_type == 'tdnn'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
cd sherpa-onnx-tdnn-yesno tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-tdnn-yesno.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--tdnn-model=./sherpa-onnx-tdnn-yesno/model-epoch-14-avg-2.onnx \ --tdnn-model=./sherpa-onnx-tdnn-yesno/model-epoch-14-avg-2.onnx \

View File

@@ -94,10 +94,9 @@ jobs:
if: matrix.model_type == 'transducer' if: matrix.model_type == 'transducer'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
cd sherpa-onnx-streaming-zipformer-en-2023-06-26 tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
cd ..
python3 ./python-api-examples/streaming_server.py \ python3 ./python-api-examples/streaming_server.py \
--encoder ./sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.onnx \ --encoder ./sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.onnx \
@@ -118,10 +117,9 @@ jobs:
if: matrix.model_type == 'paraformer' if: matrix.model_type == 'paraformer'
shell: bash shell: bash
run: | run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd ..
python3 ./python-api-examples/streaming_server.py \ python3 ./python-api-examples/streaming_server.py \
--tokens ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \ --tokens ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \

View File

@@ -88,6 +88,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone http://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-de.git ms git clone http://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-de.git ms
@@ -126,6 +127,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-tts-sherpa-onnx-de huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-tts-sherpa-onnx-de huggingface
cd huggingface cd huggingface

View File

@@ -90,6 +90,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-en.git ms git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-en.git ms
cd ms cd ms
@@ -126,6 +127,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-en huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-en huggingface
cd huggingface cd huggingface

View File

@@ -86,6 +86,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-en.git ms git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-en.git ms
cd ms cd ms
@@ -122,6 +123,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-tts-sherpa-onnx-en huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-tts-sherpa-onnx-en huggingface
cd huggingface cd huggingface

View File

@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-cantonese-en-paraformer huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-cantonese-en-paraformer huggingface
cd huggingface cd huggingface
@@ -133,6 +134,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-cantonese-en-paraformer.git ms git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-cantonese-en-paraformer.git ms
cd ms cd ms

View File

@@ -97,6 +97,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en-paraformer.git ms git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en-paraformer.git ms
cd ms cd ms
@@ -133,6 +134,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en-paraformer huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en-paraformer huggingface
cd huggingface cd huggingface

View File

@@ -88,6 +88,7 @@ jobs:
rm -rf ms rm -rf ms
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en.git ms git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en.git ms
cd ms cd ms
@@ -124,6 +125,7 @@ jobs:
rm -rf huggingface rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en huggingface git clone https://huggingface.co/spaces/k2-fsa/web-assembly-asr-sherpa-onnx-zh-en huggingface
cd huggingface cd huggingface

View File

@@ -215,6 +215,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -217,6 +217,7 @@ jobs:
git config --global user.name "Fangjun Kuang" git config --global user.name "Fangjun Kuang"
rm -rf huggingface rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface cd huggingface

View File

@@ -3,10 +3,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-nemo-ctc-en-conformer-medium ]; then if [ ! -d ./sherpa-onnx-nemo-ctc-en-conformer-medium ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd sherpa-onnx-nemo-ctc-en-conformer-medium tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd ..
fi fi
dotnet run \ dotnet run \

View File

@@ -3,10 +3,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-paraformer-zh-2023-03-28 ]; then if [ ! -d ./sherpa-onnx-paraformer-zh-2023-03-28 ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd sherpa-onnx-paraformer-zh-2023-03-28 tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd ..
fi fi
dotnet run \ dotnet run \

View File

@@ -3,10 +3,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-tdnn-yesno ]; then if [ ! -d ./sherpa-onnx-tdnn-yesno ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
cd sherpa-onnx-tdnn-yesno tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-tdnn-yesno.tar.bz2
cd ..
fi fi
dotnet run \ dotnet run \

View File

@@ -3,10 +3,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-whisper-tiny.en ]; then if [ ! -d ./sherpa-onnx-whisper-tiny.en ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
cd sherpa-onnx-whisper-tiny.en tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-whisper-tiny.en.tar.bz2
cd ..
fi fi
dotnet run \ dotnet run \

View File

@@ -6,10 +6,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd ..
fi fi
dotnet run -c Release \ dotnet run -c Release \

View File

@@ -8,6 +8,7 @@ set -ex
if [ ! -d ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 ]; then if [ ! -d ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
fi fi
dotnet run -c Release \ dotnet run -c Release \

View File

@@ -6,10 +6,9 @@
set -ex set -ex
if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd ..
fi fi
dotnet run -c Release \ dotnet run -c Release \

View File

@@ -9,15 +9,14 @@ set -ex
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$PWD:$DYLD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$PWD:$DYLD_LIBRARY_PATH
if [ ! -d ./icefall-asr-zipformer-streaming-wenetspeech-20230615 ]; then if [ ! -d ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/pkufool/icefall-asr-zipformer-streaming-wenetspeech-20230615 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
cd icefall-asr-zipformer-streaming-wenetspeech-20230615 tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
cd ..
fi fi
dotnet run -c Release \ dotnet run -c Release \
--tokens ./icefall-asr-zipformer-streaming-wenetspeech-20230615/data/lang_char/tokens.txt \ --tokens ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt \
--encoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/encoder-epoch-12-avg-4-chunk-16-left-128.onnx \ --encoder ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.int8.onnx \
--decoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/decoder-epoch-12-avg-4-chunk-16-left-128.onnx \ --decoder ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.int8.onnx \
--joiner ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/joiner-epoch-12-avg-4-chunk-16-left-128.onnx --joiner ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.int8.onnx

View File

@@ -23,10 +23,9 @@ Usage examples:
(1) Use a non-streaming transducer model (1) Use a non-streaming transducer model
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
cd sherpa-onnx-zipformer-en-2023-06-26 tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \ --encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \
@@ -37,22 +36,20 @@ python3 ./python-api-examples/non_streaming_server.py \
(2) Use a non-streaming paraformer (2) Use a non-streaming paraformer
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd sherpa-onnx-paraformer-bilingual-zh-en/ tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--paraformer ./sherpa-onnx-paraformer-bilingual-zh-en/model.int8.onnx \ --paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-bilingual-zh-en/tokens.txt --tokens ./sherpa-onnx-paraformer-zh-2023-03-28/tokens.txt
(3) Use a non-streaming CTC model from NeMo (3) Use a non-streaming CTC model from NeMo
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd sherpa-onnx-nemo-ctc-en-conformer-medium tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \ --nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \
@@ -61,10 +58,9 @@ python3 ./python-api-examples/non_streaming_server.py \
(4) Use a non-streaming CTC model from WeNet (4) Use a non-streaming CTC model from WeNet
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
cd sherpa-onnx-zh-wenet-wenetspeech tar xvf sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--wenet-ctc ./sherpa-onnx-zh-wenet-wenetspeech/model.onnx \ --wenet-ctc ./sherpa-onnx-zh-wenet-wenetspeech/model.onnx \
@@ -73,10 +69,9 @@ python3 ./python-api-examples/non_streaming_server.py \
(5) Use a Whisper model (5) Use a Whisper model
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
cd sherpa-onnx-whisper-tiny.en tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-whisper-tiny.en.tar.bz2
cd ..
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \ --whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \
@@ -87,9 +82,9 @@ python3 ./python-api-examples/non_streaming_server.py \
cd /path/to/sherpa-onnx cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
cd sherpa-onnx-tdnn-yesno tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-tdnn-yesno.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \ python3 ./python-api-examples/non_streaming_server.py \
--sample-rate=8000 \ --sample-rate=8000 \
@@ -383,6 +378,7 @@ def add_hotwords_args(parser: argparse.ArgumentParser):
""", """,
) )
def add_blank_penalty_args(parser: argparse.ArgumentParser): def add_blank_penalty_args(parser: argparse.ArgumentParser):
parser.add_argument( parser.add_argument(
"--blank-penalty", "--blank-penalty",

View File

@@ -8,9 +8,9 @@ Usage:
(1) Streaming transducer (1) Streaming transducer
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
cd sherpa-onnx-streaming-zipformer-en-2023-06-26 tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
./python-api-examples/online-decode-files.py \ ./python-api-examples/online-decode-files.py \
--tokens=./sherpa-onnx-streaming-zipformer-en-2023-06-26/tokens.txt \ --tokens=./sherpa-onnx-streaming-zipformer-en-2023-06-26/tokens.txt \
@@ -23,9 +23,9 @@ git lfs pull --include "*.onnx"
(2) Streaming paraformer (2) Streaming paraformer
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
./python-api-examples/online-decode-files.py \ ./python-api-examples/online-decode-files.py \
--tokens=./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \ --tokens=./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \
@@ -52,9 +52,9 @@ ls -lh sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13
(4) Streaming Conformer CTC from WeNet (4) Streaming Conformer CTC from WeNet
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
cd sherpa-onnx-zh-wenet-wenetspeech tar xvf sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
git lfs pull --include "*.onnx" rm sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
./python-api-examples/online-decode-files.py \ ./python-api-examples/online-decode-files.py \
--tokens=./sherpa-onnx-zh-wenet-wenetspeech/tokens.txt \ --tokens=./sherpa-onnx-zh-wenet-wenetspeech/tokens.txt \

View File

@@ -4,6 +4,7 @@ set -ex
echo "Downloading models" echo "Downloading models"
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/openspeech/wespeaker-models git clone https://huggingface.co/openspeech/wespeaker-models
cd wespeaker-models cd wespeaker-models
git lfs pull --include "*.onnx" git lfs pull --include "*.onnx"