Allow more online models to load tokens file from the memory (#1352)
Co-authored-by: xiao <shawl336@6163.com>
This commit is contained in:
96
.github/workflows/c-api-from-buffer.yaml
vendored
96
.github/workflows/c-api-from-buffer.yaml
vendored
@@ -120,3 +120,99 @@ jobs:
|
||||
./streaming-zipformer-buffered-tokens-hotwords-c-api
|
||||
|
||||
rm -rf sherpa-onnx-streaming-zipformer-*
|
||||
|
||||
- name: Test streaming paraformer with tokens loaded from buffers
|
||||
shell: bash
|
||||
run: |
|
||||
gcc -o streaming-paraformer-buffered-tokens-c-api ./c-api-examples/streaming-paraformer-buffered-tokens-c-api.c \
|
||||
-I ./build/install/include \
|
||||
-L ./build/install/lib/ \
|
||||
-l sherpa-onnx-c-api \
|
||||
-l onnxruntime
|
||||
|
||||
ls -lh streaming-paraformer-buffered-tokens-c-api
|
||||
|
||||
if [[ ${{ matrix.os }} == ubuntu-latest ]]; then
|
||||
ldd ./streaming-paraformer-buffered-tokens-c-api
|
||||
echo "----"
|
||||
readelf -d ./streaming-paraformer-buffered-tokens-c-api
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
ls -lh sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
echo "---"
|
||||
ls -lh sherpa-onnx-streaming-paraformer-bilingual-zh-en/test_wavs
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
./streaming-paraformer-buffered-tokens-c-api
|
||||
|
||||
rm -rf sherpa-onnx-streaming-paraformer-*
|
||||
|
||||
- name: Test streaming ctc with tokens loaded from buffers
|
||||
shell: bash
|
||||
run: |
|
||||
gcc -o streaming-ctc-buffered-tokens-c-api ./c-api-examples/streaming-ctc-buffered-tokens-c-api.c \
|
||||
-I ./build/install/include \
|
||||
-L ./build/install/lib/ \
|
||||
-l sherpa-onnx-c-api \
|
||||
-l onnxruntime
|
||||
|
||||
ls -lh streaming-ctc-buffered-tokens-c-api
|
||||
|
||||
if [[ ${{ matrix.os }} == ubuntu-latest ]]; then
|
||||
ldd ./streaming-ctc-buffered-tokens-c-api
|
||||
echo "----"
|
||||
readelf -d ./streaming-ctc-buffered-tokens-c-api
|
||||
fi
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
rm sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
|
||||
ls -lh sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13
|
||||
echo "---"
|
||||
ls -lh sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/test_wavs
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
./streaming-ctc-buffered-tokens-c-api
|
||||
|
||||
rm -rf sherpa-onnx-streaming-ctc-*
|
||||
|
||||
- name: Test keywords spotting with tokens and keywords loaded from buffers
|
||||
shell: bash
|
||||
run: |
|
||||
gcc -o keywords-spotter-buffered-tokens-keywords-c-api ./c-api-examples/keywords-spotter-buffered-tokens-keywords-c-api.c \
|
||||
-I ./build/install/include \
|
||||
-L ./build/install/lib/ \
|
||||
-l sherpa-onnx-c-api \
|
||||
-l onnxruntime
|
||||
|
||||
ls -lh keywords-spotter-buffered-tokens-keywords-c-api
|
||||
|
||||
if [[ ${{ matrix.os }} == ubuntu-latest ]]; then
|
||||
ldd ./keywords-spotter-buffered-tokens-keywords-c-api
|
||||
echo "----"
|
||||
readelf -d ./keywords-spotter-buffered-tokens-keywords-c-api
|
||||
fi
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/kws-models/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01-mobile.tar.bz2
|
||||
tar xvf sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01-mobile.tar.bz2
|
||||
rm sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01-mobile.tar.bz2
|
||||
|
||||
ls -lh sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01-mobile
|
||||
echo "---"
|
||||
ls -lh sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01-mobile/test_wavs
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
./keywords-spotter-buffered-tokens-keywords-c-api
|
||||
|
||||
rm -rf sherpa-onnx-kws-zipformer-*
|
||||
Reference in New Issue
Block a user