正在显示
5 个修改的文件
包含
31 行增加
和
31 行删除
| @@ -35,24 +35,33 @@ time $EXE \ | @@ -35,24 +35,33 @@ time $EXE \ | ||
| 35 | --num-threads=2 \ | 35 | --num-threads=2 \ |
| 36 | $repo/test_wavs/0.wav \ | 36 | $repo/test_wavs/0.wav \ |
| 37 | $repo/test_wavs/1.wav \ | 37 | $repo/test_wavs/1.wav \ |
| 38 | - $repo/test_wavs/2.wav | ||
| 39 | - | ||
| 40 | - | ||
| 41 | -if command -v sox &> /dev/null; then | ||
| 42 | - echo "test 8kHz" | ||
| 43 | - sox $repo/test_wavs/0.wav -r 8000 8k.wav | ||
| 44 | - | ||
| 45 | - time $EXE \ | ||
| 46 | - --tokens=$repo/tokens.txt \ | ||
| 47 | - --encoder=$repo/encoder-epoch-99-avg-1.onnx \ | ||
| 48 | - --decoder=$repo/decoder-epoch-99-avg-1.onnx \ | ||
| 49 | - --joiner=$repo/joiner-epoch-99-avg-1.onnx \ | ||
| 50 | - --num-threads=2 \ | ||
| 51 | - $repo/test_wavs/0.wav \ | ||
| 52 | - $repo/test_wavs/1.wav \ | ||
| 53 | - $repo/test_wavs/2.wav \ | ||
| 54 | - 8k.wav | ||
| 55 | -fi | 38 | + $repo/test_wavs/8k.wav |
| 39 | + | ||
| 40 | +rm -rf $repo | ||
| 41 | + | ||
| 42 | +log "------------------------------------------------------------" | ||
| 43 | +log "Run Zipformer transducer (English)" | ||
| 44 | +log "------------------------------------------------------------" | ||
| 45 | + | ||
| 46 | +repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-03-30 | ||
| 47 | +log "Start testing ${repo_url}" | ||
| 48 | +repo=$(basename $repo_url) | ||
| 49 | +log "Download pretrained model and test-data from $repo_url" | ||
| 50 | + | ||
| 51 | +GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url | ||
| 52 | +pushd $repo | ||
| 53 | +git lfs pull --include "*.onnx" | ||
| 54 | +popd | ||
| 55 | + | ||
| 56 | +time $EXE \ | ||
| 57 | + --tokens=$repo/tokens.txt \ | ||
| 58 | + --encoder=$repo/encoder-epoch-99-avg-1.onnx \ | ||
| 59 | + --decoder=$repo/decoder-epoch-99-avg-1.onnx \ | ||
| 60 | + --joiner=$repo/joiner-epoch-99-avg-1.onnx \ | ||
| 61 | + --num-threads=2 \ | ||
| 62 | + $repo/test_wavs/0.wav \ | ||
| 63 | + $repo/test_wavs/1.wav \ | ||
| 64 | + $repo/test_wavs/8k.wav | ||
| 56 | 65 | ||
| 57 | rm -rf $repo | 66 | rm -rf $repo |
| 58 | 67 |
| @@ -46,13 +46,6 @@ jobs: | @@ -46,13 +46,6 @@ jobs: | ||
| 46 | with: | 46 | with: |
| 47 | fetch-depth: 0 | 47 | fetch-depth: 0 |
| 48 | 48 | ||
| 49 | - - name: Install sox | ||
| 50 | - shell: bash | ||
| 51 | - run: | | ||
| 52 | - sudo apt-get update | ||
| 53 | - sudo apt-get install -y sox | ||
| 54 | - sox -h | ||
| 55 | - | ||
| 56 | - name: Configure CMake | 49 | - name: Configure CMake |
| 57 | shell: bash | 50 | shell: bash |
| 58 | run: | | 51 | run: | |
| @@ -43,12 +43,6 @@ jobs: | @@ -43,12 +43,6 @@ jobs: | ||
| 43 | with: | 43 | with: |
| 44 | fetch-depth: 0 | 44 | fetch-depth: 0 |
| 45 | 45 | ||
| 46 | - - name: Install sox | ||
| 47 | - shell: bash | ||
| 48 | - run: | | ||
| 49 | - brew install sox | ||
| 50 | - sox -h | ||
| 51 | - | ||
| 52 | - name: Configure CMake | 46 | - name: Configure CMake |
| 53 | shell: bash | 47 | shell: bash |
| 54 | run: | | 48 | run: | |
| @@ -7,6 +7,7 @@ on: | @@ -7,6 +7,7 @@ on: | ||
| 7 | paths: | 7 | paths: |
| 8 | - '.github/workflows/windows-x64.yaml' | 8 | - '.github/workflows/windows-x64.yaml' |
| 9 | - '.github/scripts/test-online-transducer.sh' | 9 | - '.github/scripts/test-online-transducer.sh' |
| 10 | + - '.github/scripts/test-offline-transducer.sh' | ||
| 10 | - 'CMakeLists.txt' | 11 | - 'CMakeLists.txt' |
| 11 | - 'cmake/**' | 12 | - 'cmake/**' |
| 12 | - 'sherpa-onnx/csrc/*' | 13 | - 'sherpa-onnx/csrc/*' |
| @@ -16,6 +17,7 @@ on: | @@ -16,6 +17,7 @@ on: | ||
| 16 | paths: | 17 | paths: |
| 17 | - '.github/workflows/windows-x64.yaml' | 18 | - '.github/workflows/windows-x64.yaml' |
| 18 | - '.github/scripts/test-online-transducer.sh' | 19 | - '.github/scripts/test-online-transducer.sh' |
| 20 | + - '.github/scripts/test-offline-transducer.sh' | ||
| 19 | - 'CMakeLists.txt' | 21 | - 'CMakeLists.txt' |
| 20 | - 'cmake/**' | 22 | - 'cmake/**' |
| 21 | - 'sherpa-onnx/csrc/*' | 23 | - 'sherpa-onnx/csrc/*' |
| @@ -7,6 +7,7 @@ on: | @@ -7,6 +7,7 @@ on: | ||
| 7 | paths: | 7 | paths: |
| 8 | - '.github/workflows/windows-x86.yaml' | 8 | - '.github/workflows/windows-x86.yaml' |
| 9 | - '.github/scripts/test-online-transducer.sh' | 9 | - '.github/scripts/test-online-transducer.sh' |
| 10 | + - '.github/scripts/test-offline-transducer.sh' | ||
| 10 | - 'CMakeLists.txt' | 11 | - 'CMakeLists.txt' |
| 11 | - 'cmake/**' | 12 | - 'cmake/**' |
| 12 | - 'sherpa-onnx/csrc/*' | 13 | - 'sherpa-onnx/csrc/*' |
| @@ -16,6 +17,7 @@ on: | @@ -16,6 +17,7 @@ on: | ||
| 16 | paths: | 17 | paths: |
| 17 | - '.github/workflows/windows-x86.yaml' | 18 | - '.github/workflows/windows-x86.yaml' |
| 18 | - '.github/scripts/test-online-transducer.sh' | 19 | - '.github/scripts/test-online-transducer.sh' |
| 20 | + - '.github/scripts/test-offline-transducer.sh' | ||
| 19 | - 'CMakeLists.txt' | 21 | - 'CMakeLists.txt' |
| 20 | - 'cmake/**' | 22 | - 'cmake/**' |
| 21 | - 'sherpa-onnx/csrc/*' | 23 | - 'sherpa-onnx/csrc/*' |
-
请 注册 或 登录 后发表评论