This PR adds support for non-streaming Zipformer CTC ASR models across multiple language bindings, WebAssembly, examples, and CI workflows. - Introduces a new OfflineZipformerCtcModelConfig in C/C++, Python, Swift, Java, Kotlin, Go, Dart, Pascal, and C# APIs - Updates initialization, freeing, and recognition logic to include Zipformer CTC in WASM and Node.js - Adds example scripts and CI steps for downloading, building, and running Zipformer CTC models Model doc is available at https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/icefall/zipformer.html
39 lines
1.0 KiB
Bash
Executable File
39 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
if [[ ! -f ../build/lib/libsherpa-onnx-jni.dylib && ! -f ../build/lib/libsherpa-onnx-jni.so ]]; then
|
|
mkdir -p ../build
|
|
pushd ../build
|
|
cmake \
|
|
-DSHERPA_ONNX_ENABLE_PYTHON=OFF \
|
|
-DSHERPA_ONNX_ENABLE_TESTS=OFF \
|
|
-DSHERPA_ONNX_ENABLE_CHECK=OFF \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DSHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
|
|
-DSHERPA_ONNX_ENABLE_JNI=ON \
|
|
..
|
|
|
|
make -j4
|
|
ls -lh lib
|
|
popd
|
|
fi
|
|
|
|
if [ ! -f ../sherpa-onnx/java-api/build/sherpa-onnx.jar ]; then
|
|
pushd ../sherpa-onnx/java-api
|
|
make
|
|
popd
|
|
fi
|
|
|
|
if [ ! -f ./sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03/tokens.txt ]; then
|
|
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2
|
|
|
|
tar xvf sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2
|
|
rm sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2
|
|
fi
|
|
|
|
java \
|
|
-Djava.library.path=$PWD/../build/lib \
|
|
-cp ../sherpa-onnx/java-api/build/sherpa-onnx.jar \
|
|
NonStreamingDecodeFileZipformerCtc.java
|