Add streaming CTC ASR APIs for node-addon-api (#867)

This commit is contained in:
Fangjun Kuang
2024-05-13 11:58:25 +08:00
committed by GitHub
parent db85b2c1d8
commit 384f96c40f
15 changed files with 443 additions and 29 deletions

15
scripts/node-addon-api/run.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -ex
if [[ ! -f ../../build/install/lib/libsherpa-onnx-core.dylib && ! -f ../../build/install/lib/libsherpa-onnx-core.so ]]; then
pushd ../../
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON ..
make install
popd
fi
export SHERPA_ONNX_INSTALL_DIR=$PWD/../../build/install
./node_modules/.bin/cmake-js compile