Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2024-05-21 20:37:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-05-21 20:37:29 +0800
Commit
b445956675e4f8e41ac26dffeea6f1b2d59215f0
b4459566
1 parent
fdcae56a
Fix CI tests. (#898)
显示空白字符变更
内嵌
并排对比
正在显示
58 个修改的文件
包含
345 行增加
和
354 行删除
.github/scripts/test-offline-ctc.sh
.github/scripts/test-offline-transducer.sh
.github/scripts/test-offline-tts.sh
.github/scripts/test-offline-whisper.sh
.github/scripts/test-online-ctc.sh
.github/scripts/test-online-paraformer.sh
.github/scripts/test-online-transducer.sh
.github/scripts/test-python.sh
.github/scripts/test-spoken-language-identification.sh
.github/workflows/aarch64-linux-gnu-shared.yaml
.github/workflows/aarch64-linux-gnu-static.yaml
.github/workflows/android.yaml
.github/workflows/apk-asr-2pass.yaml
.github/workflows/apk-asr.yaml
.github/workflows/apk-audio-tagging-wearos.yaml
.github/workflows/apk-audio-tagging.yaml
.github/workflows/apk-kws.yaml
.github/workflows/apk-speaker-identification.yaml
.github/workflows/apk-spoken-language-identification.yaml
.github/workflows/apk-tts-engine.yaml
.github/workflows/apk-tts.yaml
.github/workflows/apk-vad-asr.yaml
.github/workflows/apk-vad.yaml
.github/workflows/arm-linux-gnueabihf.yaml
.github/workflows/build-wheels-aarch64.yaml
.github/workflows/build-wheels-armv7l.yaml
.github/workflows/build-wheels-linux.yaml
.github/workflows/build-wheels-macos-arm64.yaml
.github/workflows/build-wheels-macos-x64.yaml
.github/workflows/build-wheels-win32.yaml
.github/workflows/build-wheels-win64.yaml
.github/workflows/build-xcframework.yaml
.github/workflows/export-ced-to-onnx.yaml
.github/workflows/export-wenet-to-onnx.yaml
.github/workflows/export-whisper-to-onnx.yaml
.github/workflows/linux.yaml
.github/workflows/riscv64-linux.yaml
.github/workflows/test-python-offline-websocket-server.yaml
.github/workflows/test-python-online-websocket-server.yaml
.github/workflows/wasm-simd-hf-space-de-tts.yaml
.github/workflows/wasm-simd-hf-space-en-asr-zipformer.yaml
.github/workflows/wasm-simd-hf-space-en-tts.yaml
.github/workflows/wasm-simd-hf-space-zh-cantonese-en-asr-paraformer.yaml
.github/workflows/wasm-simd-hf-space-zh-en-asr-paraformer.yaml
.github/workflows/wasm-simd-hf-space-zh-en-asr-zipformer.yaml
.github/workflows/windows-x64.yaml
.github/workflows/windows-x86.yaml
dotnet-examples/offline-decode-files/run-nemo-ctc.sh
dotnet-examples/offline-decode-files/run-paraformer.sh
dotnet-examples/offline-decode-files/run-tdnn-yesno.sh
dotnet-examples/offline-decode-files/run-whisper.sh
dotnet-examples/online-decode-files/run-paraformer.sh
dotnet-examples/online-decode-files/run-transducer.sh
dotnet-examples/speech-recognition-from-microphone/run-paraformer.sh
dotnet-examples/speech-recognition-from-microphone/run-transducer.sh
python-api-examples/non_streaming_server.py
python-api-examples/online-decode-files.py
scripts/wespeaker/run.sh
.github/scripts/test-offline-ctc.sh
查看文件 @
b445956
...
...
@@ -124,15 +124,13 @@ sherpa-onnx-en-wenet-librispeech
# sherpa-onnx-en-wenet-gigaspeech
)
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
}
"
repo
=
$
(
basename
$repo_url
)
repo
=
$
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"
ls -lh
*
.onnx
popd
curl -SL -O
$repo_url
tar xvf
$name
.tar.bz2
rm
$name
.tar.bz2
log
"test float32 models"
time
$EXE
\
...
...
@@ -156,16 +154,13 @@ done
log
"------------------------------------------------------------"
log
"Run tdnn yesno (Hebrew)"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
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
url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
curl -SL -O
$url
tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
rm sherpa-onnx-tdnn-yesno.tar.bz2
log
"Start testing
${
url
}
"
repo
=
sherpa-onnx-tdnn-yesno
log
"Download pretrained model and test-data from
$url
"
log
"test float32 models"
time
$EXE
\
...
...
@@ -201,17 +196,14 @@ log "------------------------------------------------------------"
log
"Run Citrinet (stt_en_citrinet_512, English)"
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
}
"
repo
=
$(
basename
$repo_url
)
repo
=
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
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
time
$EXE
\
--tokens
=
$repo
/tokens.txt
\
--nemo-ctc-model
=
$repo
/model.onnx
\
...
...
@@ -233,18 +225,14 @@ rm -rf $repo
log
"------------------------------------------------------------"
log
"Run Librispeech zipformer CTC H/HL/HLG decoding (English) "
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
}
"
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
"
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
=(
$repo
/H.fst
$repo
/HL.fst
...
...
.github/scripts/test-offline-transducer.sh
查看文件 @
b445956
...
...
@@ -118,17 +118,14 @@ log "------------------------------------------------------------"
log
"Run Conformer transducer (English)"
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
}
"
repo
=
$(
basename
$repo_url
)
repo
=
sherpa-onnx-conformer-en-2023-03-18
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
\
--tokens
=
$repo
/tokens.txt
\
--encoder
=
$repo
/encoder-epoch-99-avg-1.onnx
\
...
...
@@ -155,16 +152,12 @@ log "------------------------------------------------------------"
log
"Run Zipformer transducer (English)"
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
}
"
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
\
--tokens
=
$repo
/tokens.txt
\
...
...
@@ -192,16 +185,12 @@ log "------------------------------------------------------------"
log
"Run Paraformer (Chinese)"
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
}
"
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
\
--tokens
=
$repo
/tokens.txt
\
...
...
@@ -229,16 +218,13 @@ log "------------------------------------------------------------"
log
"Run Paraformer (Chinese) with timestamps"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-09-14
log
"Start testing
${
repo_url
}
"
repo
=
$(
basename
$repo_url
)
log
"Download pretrained model and test-data from
$repo_url
"
repo_url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
curl -SL -O
$repo_url
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
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
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
log
"Start testing
${
repo_url
}
"
time
$EXE
\
--tokens
=
$repo
/tokens.txt
\
...
...
.github/scripts/test-offline-tts.sh
查看文件 @
b445956
...
...
@@ -40,15 +40,13 @@ log "------------------------------------------------------------"
log
"vits-ljs test"
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
}
"
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
\
--vits-model
=
$repo
/vits-ljs.onnx
\
...
...
@@ -65,15 +63,13 @@ log "------------------------------------------------------------"
log
"vits-vctk test"
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
}
"
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
$EXE
\
...
...
@@ -93,15 +89,13 @@ log "------------------------------------------------------------"
log
"vits-zh-aishell3"
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
}
"
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
$EXE
\
...
...
.github/scripts/test-offline-whisper.sh
查看文件 @
b445956
...
...
@@ -33,17 +33,12 @@ for name in ${names[@]}; do
log
"Run
$name
"
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
}
"
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"
...
...
.github/scripts/test-online-ctc.sh
查看文件 @
b445956
...
...
@@ -55,7 +55,7 @@ $EXE \
$repo
/test_wavs/1.wav
\
$repo
/test_wavs/8k.wav
rm -rf
sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18
rm -rf
$repo
log
"------------------------------------------------------------"
log
"Run streaming Zipformer2 CTC "
...
...
@@ -87,28 +87,26 @@ time $EXE \
$repo
/test_wavs/DEV_T0000000001.wav
\
$repo
/test_wavs/DEV_T0000000002.wav
rm -rf
$repo
log
"------------------------------------------------------------"
log
"Run streaming Conformer CTC from WeNet"
log
"------------------------------------------------------------"
wenet_models
=(
sherpa-onnx-zh-wenet-aishell
sherpa-onnx-zh-wenet-aishell2
sherpa-onnx-zh-wenet-wenetspeech
sherpa-onnx-zh-wenet-multi-cn
# sherpa-onnx-zh-wenet-aishell2
# sherpa-onnx-zh-wenet-wenetspeech
# sherpa-onnx-zh-wenet-multi-cn
sherpa-onnx-en-wenet-librispeech
sherpa-onnx-en-wenet-gigaspeech
#
sherpa-onnx-en-wenet-gigaspeech
)
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
}
"
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"
time
$EXE
\
...
...
.github/scripts/test-online-paraformer.sh
查看文件 @
b445956
...
...
@@ -19,16 +19,13 @@ log "------------------------------------------------------------"
log
"Run streaming Paraformer"
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
curl -SL -O
$repo_url
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
repo
=
sherpa-onnx-streaming-paraformer-bilingual-zh-en
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
\
--tokens
=
$repo
/tokens.txt
\
...
...
.github/scripts/test-online-transducer.sh
查看文件 @
b445956
...
...
@@ -19,16 +19,13 @@ log "------------------------------------------------------------"
log
"Run LSTM transducer (English)"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-lstm-en-2023-02-17
log
"Start testing
${
repo_url
}
"
repo
=
$(
basename
$repo_url
)
log
"Download pretrained model and test-data from
$repo_url
"
repo_url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-lstm-en-2023-02-17.tar.bz2
curl -SL -O
$repo_url
tar xvf sherpa-onnx-lstm-en-2023-02-17.tar.bz2
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
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
log
"Start testing
${
repo_url
}
"
waves
=(
$repo
/test_wavs/0.wav
...
...
@@ -62,16 +59,13 @@ log "------------------------------------------------------------"
log
"Run LSTM transducer (Chinese)"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-lstm-zh-2023-02-20
log
"Start testing
${
repo_url
}
"
repo
=
$(
basename
$repo_url
)
log
"Download pretrained model and test-data from
$repo_url
"
repo_url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-lstm-zh-2023-02-20.tar.bz2
curl -SL -O
$repo_url
tar xvf sherpa-onnx-lstm-zh-2023-02-20.tar.bz2
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
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
log
"Start testing
${
repo_url
}
"
waves
=(
$repo
/test_wavs/0.wav
...
...
@@ -105,16 +99,13 @@ log "------------------------------------------------------------"
log
"Run streaming Zipformer transducer (English)"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-02-21
log
"Start testing
${
repo_url
}
"
repo
=
$(
basename
$repo_url
)
log
"Download pretrained model and test-data from
$repo_url
"
repo_url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-02-21.tar.bz2
curl -SL -O
$repo_url
tar xvf sherpa-onnx-streaming-zipformer-en-2023-02-21.tar.bz2
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
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
log
"Start testing
${
repo_url
}
"
waves
=(
$repo
/test_wavs/0.wav
...
...
@@ -150,16 +141,13 @@ log "------------------------------------------------------------"
log
"Run streaming Zipformer transducer (Bilingual, Chinese + English)"
log
"------------------------------------------------------------"
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
log
"Start testing
${
repo_url
}
"
repo
=
$(
basename
$repo_url
)
log
"Download pretrained model and test-data from
$repo_url
"
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
GIT_LFS_SKIP_SMUDGE
=
1 git clone
$repo_url
pushd
$repo
git lfs pull --include
"*.onnx"
ls -lh
*
.onnx
popd
log
"Start testing
${
repo_url
}
"
waves
=(
$repo
/test_wavs/0.wav
...
...
@@ -216,16 +204,13 @@ log "------------------------------------------------------------"
log
"Run streaming Conformer transducer (English)"
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
curl -SL -O
$repo_url
tar xvf sherpa-onnx-streaming-conformer-en-2023-05-09.tar.bz2
rm sherpa-onnx-streaming-conformer-en-2023-05-09.tar.bz2
repo
=
sherpa-onnx-streaming-conformer-en-2023-05-09
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
waves
=(
$repo
/test_wavs/0.wav
...
...
.github/scripts/test-python.sh
查看文件 @
b445956
...
...
@@ -102,20 +102,16 @@ wenet_models=(
# sherpa-onnx-zh-wenet-wenetspeech
# sherpa-onnx-zh-wenet-multi-cn
sherpa-onnx-en-wenet-librispeech
sherpa-onnx-en-wenet-gigaspeech
#
sherpa-onnx-en-wenet-gigaspeech
)
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
}
"
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
\
--tokens
=
$repo
/tokens.txt
\
...
...
@@ -206,16 +202,14 @@ log "Test streaming transducer models"
if
[[
x
$OS
!
=
x
'windows-latest'
]]
;
then
echo
"OS:
$OS
"
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
}
"
repo
=
$dir
/
$(
basename
$repo_url
)
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
repo
=
$dir
/
$repo
python3 -c
"import sherpa_onnx; print(sherpa_onnx.__file__)"
sherpa_onnx_version
=
$(
python3 -c
"import sherpa_onnx; print(sherpa_onnx.__version__)"
)
...
...
@@ -255,15 +249,14 @@ fi
log
"Test non-streaming transducer models"
pushd
$dir
repo_url
=
https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-04-01
log
"Start testing
${
repo_url
}
"
repo
=
$dir
/
$(
basename
$repo_url
)
repo_url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
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"
curl -SL -O
$repo_url
tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
repo
=
$dir
/sherpa-onnx-zipformer-en-2023-04-01
popd
ls -lh
$repo
...
...
@@ -295,16 +288,13 @@ log "Test non-streaming paraformer models"
if
[[
x
$OS
!
=
x
'windows-latest'
]]
;
then
echo
"OS:
$OS
"
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
}
"
repo
=
$dir
/
$(
basename
$repo_url
)
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
repo
=
$dir
/sherpa-onnx-paraformer-zh-2023-03-28
ls -lh
$repo
...
...
@@ -332,16 +322,13 @@ fi
log
"Test non-streaming NeMo CTC models"
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
}
"
repo
=
$dir
/
$(
basename
$repo_url
)
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
repo
=
$dir
/sherpa-onnx-nemo-ctc-en-citrinet-512
ls -lh
$repo
...
...
.github/scripts/test-spoken-language-identification.sh
查看文件 @
b445956
...
...
@@ -73,18 +73,13 @@ for name in ${names[@]}; do
log
"------------------------------------------------------------"
log
"Run
$name
"
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
}
"
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
repo
=
sherpa-onnx-whisper-
$name
for
wav
in
${
waves
[@]
}
;
do
log
"test fp32 onnx"
...
...
.github/workflows/aarch64-linux-gnu-shared.yaml
查看文件 @
b445956
...
...
@@ -192,6 +192,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
.github/workflows/aarch64-linux-gnu-static.yaml
查看文件 @
b445956
...
...
@@ -183,6 +183,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
.github/workflows/android.yaml
查看文件 @
b445956
...
...
@@ -120,6 +120,7 @@ jobs:
ls -lh
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
.github/workflows/apk-asr-2pass.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-asr.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-audio-tagging-wearos.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-audio-tagging.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-kws.yaml
查看文件 @
b445956
...
...
@@ -155,6 +155,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-speaker-identification.yaml
查看文件 @
b445956
...
...
@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-spoken-language-identification.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-tts-engine.yaml
查看文件 @
b445956
...
...
@@ -159,6 +159,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-tts.yaml
查看文件 @
b445956
...
...
@@ -159,6 +159,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-vad-asr.yaml
查看文件 @
b445956
...
...
@@ -158,6 +158,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/apk-vad.yaml
查看文件 @
b445956
...
...
@@ -155,6 +155,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
...
...
.github/workflows/arm-linux-gnueabihf.yaml
查看文件 @
b445956
...
...
@@ -92,6 +92,7 @@ jobs:
shell
:
bash
run
:
|
git lfs install
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/arm-linux-gcc
ls -lh arm-linux-gcc
...
...
.github/workflows/build-wheels-aarch64.yaml
查看文件 @
b445956
...
...
@@ -93,6 +93,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-armv7l.yaml
查看文件 @
b445956
...
...
@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-linux.yaml
查看文件 @
b445956
...
...
@@ -92,6 +92,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-macos-arm64.yaml
查看文件 @
b445956
...
...
@@ -62,6 +62,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-macos-x64.yaml
查看文件 @
b445956
...
...
@@ -79,6 +79,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-win32.yaml
查看文件 @
b445956
...
...
@@ -61,6 +61,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-wheels-win64.yaml
查看文件 @
b445956
...
...
@@ -62,6 +62,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
@@ -91,6 +92,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
cd huggingface
...
...
.github/workflows/build-xcframework.yaml
查看文件 @
b445956
...
...
@@ -134,6 +134,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
.github/workflows/export-ced-to-onnx.yaml
查看文件 @
b445956
...
...
@@ -65,6 +65,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
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
mv -v $d/* huggingface
cd huggingface
...
...
.github/workflows/export-wenet-to-onnx.yaml
查看文件 @
b445956
...
...
@@ -47,6 +47,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell huggingface
cd huggingface
...
...
@@ -88,6 +89,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-aishell2 huggingface
cd huggingface
...
...
@@ -129,6 +131,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
@@ -170,6 +173,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech huggingface
cd huggingface
...
...
@@ -211,6 +215,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-librispeech huggingface
cd huggingface
...
...
@@ -253,6 +258,7 @@ jobs:
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/csukuangfj/sherpa-onnx-en-wenet-gigaspeech huggingface
cd huggingface
...
...
.github/workflows/export-whisper-to-onnx.yaml
查看文件 @
b445956
...
...
@@ -142,6 +142,8 @@ jobs:
git config --global user.email "csukuangfj@gmail.com"
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
if [[ $model != medium-aishell ]]; then
...
...
.github/workflows/linux.yaml
查看文件 @
b445956
...
...
@@ -69,6 +69,7 @@ jobs:
run
:
|
echo "pwd: $PWD"
ls -lh
du -h -d1 .
-
name
:
Build sherpa-onnx
uses
:
addnab/docker-run-action@v3
...
...
@@ -109,6 +110,7 @@ jobs:
-
name
:
Display dependencies of sherpa-onnx for linux
shell
:
bash
run
:
|
du -h -d1 .
sudo chown -R $USER ./build
ls -lh build/bin
ls -lh build/_deps/onnxruntime-src/lib/
...
...
@@ -128,121 +130,148 @@ jobs:
name
:
release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
path
:
install/*
-
name
:
Test online
CTC
-
name
:
Test online
transducer
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
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
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 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)
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-language-identification
.github/scripts/test-spoken-language-identification.sh
du -h -d1 .
-
name
:
Test
C API
-
name
:
Test
online CTC
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export SLID_EXE=spoken-language-identification-c-api
export SID_EXE=speaker-identification-c-api
export AT_EXE=audio-tagging-c-api
export PUNCT_EXE=add-punctuation-c-api
export EXE=sherpa-onnx
.github/scripts/test-c-api.sh
.github/scripts/test-online-ctc.sh
du -h -d1 .
-
name
:
Test offline
CTC
-
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-ctc.sh
.github/scripts/test-offline-transducer.sh
du -h -d1 .
-
name
:
Test C API
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export SLID_EXE=spoken-language-identification-c-api
export SID_EXE=speaker-identification-c-api
export AT_EXE=audio-tagging-c-api
export PUNCT_EXE=add-punctuation-c-api
.github/scripts/test-c-api.sh
du -h -d1 .
-
name
:
Test offline punctuation
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-punctuation
.github/scripts/test-offline-punctuation.sh
du -h -d1 .
-
name
:
Test Audio tagging
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-audio-tagging
.github/scripts/test-audio-tagging.sh
du -h -d1 .
-
name
:
Test transducer kws
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-keyword-spotter
.github/scripts/test-kws.sh
du -h -d1 .
-
name
:
Test offline Whisper
if
:
matrix.build_type != 'Debug'
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
readelf -d build/bin/sherpa-onnx-offline
.github/scripts/test-offline-whisper.sh
du -h -d1 .
-
name
:
Test offline TTS
if
:
matrix.with_tts == 'ON'
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline-tts
.github/scripts/test-offline-tts.sh
du -h -d1 .
-
name
:
Test online paraformer
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx
.github/scripts/test-online-paraformer.sh
-
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
du -h -d1 .
-
name
:
Copy files
shell
:
bash
if
:
matrix.build_type == 'Release'
run
:
|
du -h -d1 .
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
if [[ ${{ matrix.shared_lib }} == 'ON' ]]; then
...
...
@@ -265,6 +294,7 @@ jobs:
tree $dst
tar cjvf ${dst}.tar.bz2 $dst
du -h -d1 .
-
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'
...
...
@@ -276,11 +306,14 @@ jobs:
timeout_seconds
:
200
shell
:
bash
command
:
|
du -h -d1 .
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
du -h -d1 .
cd huggingface
git lfs pull
...
...
@@ -296,6 +329,7 @@ jobs:
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
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
if
:
(github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.build_type == 'Release'
...
...
.github/workflows/riscv64-linux.yaml
查看文件 @
b445956
...
...
@@ -239,6 +239,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
...
...
.github/workflows/test-python-offline-websocket-server.yaml
查看文件 @
b445956
...
...
@@ -73,10 +73,9 @@ jobs:
if
:
matrix.model_type == 'transducer'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
cd sherpa-onnx-zipformer-en-2023-06-26
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
tar xvf sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
rm sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--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'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-bilingual-zh-en
cd sherpa-onnx-paraformer-bilingual-zh-en
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--paraformer ./sherpa-onnx-paraformer-bilingual-zh-en/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-bilingual-zh-en/tokens.txt &
--paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \
--tokens ./sherpa-onnx-paraformer-zh-2023-03-28/tokens.txt &
echo "sleep 10 seconds to wait the server start"
sleep 10
...
...
@@ -122,25 +120,24 @@ jobs:
shell
:
bash
run
:
|
python3 ./python-api-examples/offline-websocket-client-decode-files-paralell.py \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/0.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/1.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/2.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/8k.wav
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/0.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/1.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/2.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/8k.wav
python3 ./python-api-examples/offline-websocket-client-decode-files-sequential.py \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/0.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/1.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/2.wav \
./sherpa-onnx-paraformer-bilingual-zh-en/test_wavs/8k.wav
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/0.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/1.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/2.wav \
./sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/8k.wav
-
name
:
Start server for nemo_ctc models
if
:
matrix.model_type == 'nemo_ctc'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
cd sherpa-onnx-nemo-ctc-en-conformer-medium
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \
...
...
@@ -167,10 +164,9 @@ jobs:
if
:
matrix.model_type == 'whisper'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
cd sherpa-onnx-whisper-tiny.en
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
rm sherpa-onnx-whisper-tiny.en.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \
...
...
@@ -198,10 +194,9 @@ jobs:
if
:
matrix.model_type == 'tdnn'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
cd sherpa-onnx-tdnn-yesno
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
rm sherpa-onnx-tdnn-yesno.tar.bz2
python3 ./python-api-examples/non_streaming_server.py \
--tdnn-model=./sherpa-onnx-tdnn-yesno/model-epoch-14-avg-2.onnx \
...
...
.github/workflows/test-python-online-websocket-server.yaml
查看文件 @
b445956
...
...
@@ -94,10 +94,9 @@ jobs:
if
:
matrix.model_type == 'transducer'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
cd sherpa-onnx-streaming-zipformer-en-2023-06-26
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
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 \
...
...
@@ -118,10 +117,9 @@ jobs:
if
:
matrix.model_type == 'paraformer'
shell
:
bash
run
:
|
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
python3 ./python-api-examples/streaming_server.py \
--tokens ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \
...
...
.github/workflows/wasm-simd-hf-space-de-tts.yaml
查看文件 @
b445956
...
...
@@ -88,6 +88,7 @@ jobs:
rm -rf ms
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
...
...
@@ -126,6 +127,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
.github/workflows/wasm-simd-hf-space-en-asr-zipformer.yaml
查看文件 @
b445956
...
...
@@ -90,6 +90,7 @@ jobs:
rm -rf ms
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
cd ms
...
...
@@ -126,6 +127,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
.github/workflows/wasm-simd-hf-space-en-tts.yaml
查看文件 @
b445956
...
...
@@ -86,6 +86,7 @@ jobs:
rm -rf ms
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
cd ms
...
...
@@ -122,6 +123,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
.github/workflows/wasm-simd-hf-space-zh-cantonese-en-asr-paraformer.yaml
查看文件 @
b445956
...
...
@@ -96,6 +96,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
@@ -133,6 +134,7 @@ jobs:
rm -rf ms
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
cd ms
...
...
.github/workflows/wasm-simd-hf-space-zh-en-asr-paraformer.yaml
查看文件 @
b445956
...
...
@@ -97,6 +97,7 @@ jobs:
rm -rf ms
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
cd ms
...
...
@@ -133,6 +134,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
.github/workflows/wasm-simd-hf-space-zh-en-asr-zipformer.yaml
查看文件 @
b445956
...
...
@@ -88,6 +88,7 @@ jobs:
rm -rf ms
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
cd ms
...
...
@@ -124,6 +125,7 @@ jobs:
rm -rf huggingface
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
cd huggingface
...
...
.github/workflows/windows-x64.yaml
查看文件 @
b445956
...
...
@@ -215,6 +215,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
.github/workflows/windows-x86.yaml
查看文件 @
b445956
...
...
@@ -217,6 +217,7 @@ jobs:
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
...
...
dotnet-examples/offline-decode-files/run-nemo-ctc.sh
查看文件 @
b445956
...
...
@@ -3,10 +3,9 @@
set
-ex
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
cd
sherpa-onnx-nemo-ctc-en-conformer-medium
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
fi
dotnet run
\
...
...
dotnet-examples/offline-decode-files/run-paraformer.sh
查看文件 @
b445956
...
...
@@ -3,10 +3,9 @@
set
-ex
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
cd
sherpa-onnx-paraformer-zh-2023-03-28
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
fi
dotnet run
\
...
...
dotnet-examples/offline-decode-files/run-tdnn-yesno.sh
查看文件 @
b445956
...
...
@@ -3,10 +3,9 @@
set
-ex
if
[
! -d ./sherpa-onnx-tdnn-yesno
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
cd
sherpa-onnx-tdnn-yesno
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
rm sherpa-onnx-tdnn-yesno.tar.bz2
fi
dotnet run
\
...
...
dotnet-examples/offline-decode-files/run-whisper.sh
查看文件 @
b445956
...
...
@@ -3,10 +3,9 @@
set
-ex
if
[
! -d ./sherpa-onnx-whisper-tiny.en
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
cd
sherpa-onnx-whisper-tiny.en
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
rm sherpa-onnx-whisper-tiny.en.tar.bz2
fi
dotnet run
\
...
...
dotnet-examples/online-decode-files/run-paraformer.sh
查看文件 @
b445956
...
...
@@ -6,10 +6,9 @@
set
-ex
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
cd
sherpa-onnx-streaming-paraformer-bilingual-zh-en
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
fi
dotnet run -c Release
\
...
...
dotnet-examples/online-decode-files/run-transducer.sh
查看文件 @
b445956
...
...
@@ -8,6 +8,7 @@ set -ex
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
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
dotnet run -c Release
\
...
...
dotnet-examples/speech-recognition-from-microphone/run-paraformer.sh
查看文件 @
b445956
...
...
@@ -6,10 +6,9 @@
set
-ex
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
cd
sherpa-onnx-streaming-paraformer-bilingual-zh-en
git lfs pull --include
"*.onnx"
cd
..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
fi
dotnet run -c Release
\
...
...
dotnet-examples/speech-recognition-from-microphone/run-transducer.sh
查看文件 @
b445956
...
...
@@ -9,15 +9,14 @@ set -ex
export
LD_LIBRARY_PATH
=
$PWD
:
$LD_LIBRARY_PATH
export
DYLD_LIBRARY_PATH
=
$PWD
:
$DYLD_LIBRARY_PATH
if
[
! -d ./icefall-asr-zipformer-streaming-wenetspeech-20230615
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/pkufool/icefall-asr-zipformer-streaming-wenetspeech-20230615
cd
icefall-asr-zipformer-streaming-wenetspeech-20230615
git lfs pull --include
"*.onnx"
cd
..
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
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
dotnet run -c Release
\
--tokens ./icefall-asr-zipformer-streaming-wenetspeech-20230615/data/lang_char/tokens.txt
\
--encoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/encoder-epoch-12-avg-4-chunk-16-left-128.onnx
\
--decoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/decoder-epoch-12-avg-4-chunk-16-left-128.onnx
\
--joiner ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/joiner-epoch-12-avg-4-chunk-16-left-128.onnx
--tokens ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt
\
--encoder ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.int8.onnx
\
--decoder ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.int8.onnx
\
--joiner ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.int8.onnx
...
...
python-api-examples/non_streaming_server.py
查看文件 @
b445956
...
...
@@ -23,10 +23,9 @@ Usage examples:
(1) Use a non-streaming transducer model
cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
cd sherpa-onnx-zipformer-en-2023-06-26
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--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
cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-bilingual-zh-en
cd sherpa-onnx-paraformer-bilingual-zh-en/
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--paraformer ./sherpa-onnx-paraformer-bilingual-zh-en/model.int8.onnx
\
--tokens ./sherpa-onnx-paraformer-bilingual-zh-en/tokens.txt
--paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx
\
--tokens ./sherpa-onnx-paraformer-zh-2023-03-28/tokens.txt
(3) Use a non-streaming CTC model from NeMo
cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
cd sherpa-onnx-nemo-ctc-en-conformer-medium
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--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
cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech
cd sherpa-onnx-zh-wenet-wenetspeech
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
tar xvf sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
rm sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--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
cd /path/to/sherpa-onnx
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
cd sherpa-onnx-whisper-tiny.en
git lfs pull --include "*.onnx"
cd ..
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
rm sherpa-onnx-whisper-tiny.en.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--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
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
cd sherpa-onnx-tdnn-yesno
git lfs pull --include "*.onnx"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
rm sherpa-onnx-tdnn-yesno.tar.bz2
python3 ./python-api-examples/non_streaming_server.py
\
--sample-rate=8000
\
...
...
@@ -383,6 +378,7 @@ def add_hotwords_args(parser: argparse.ArgumentParser):
"""
,
)
def
add_blank_penalty_args
(
parser
:
argparse
.
ArgumentParser
):
parser
.
add_argument
(
"--blank-penalty"
,
...
...
python-api-examples/online-decode-files.py
查看文件 @
b445956
...
...
@@ -8,9 +8,9 @@ Usage:
(1) Streaming transducer
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
cd sherpa-onnx-streaming-zipformer-en-2023-06-26
git lfs pull --include "*.onnx"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
./python-api-examples/online-decode-files.py
\
--tokens=./sherpa-onnx-streaming-zipformer-en-2023-06-26/tokens.txt
\
...
...
@@ -23,9 +23,9 @@ git lfs pull --include "*.onnx"
(2) Streaming paraformer
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en
git lfs pull --include "*.onnx"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
./python-api-examples/online-decode-files.py
\
--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
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zh-wenet-wenetspeech
cd sherpa-onnx-zh-wenet-wenetspeech
git lfs pull --include "*.onnx"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
tar xvf sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
rm sherpa-onnx-zh-wenet-wenetspeech.tar.bz2
./python-api-examples/online-decode-files.py
\
--tokens=./sherpa-onnx-zh-wenet-wenetspeech/tokens.txt
\
...
...
scripts/wespeaker/run.sh
查看文件 @
b445956
...
...
@@ -4,6 +4,7 @@ set -ex
echo
"Downloading models"
export
GIT_LFS_SKIP_SMUDGE
=
1
export
GIT_CLONE_PROTECTION_ACTIVE
=
false
git clone https://huggingface.co/openspeech/wespeaker-models
cd
wespeaker-models
git lfs pull --include
"*.onnx"
...
...
请
注册
或
登录
后发表评论