Skip to content

Fix building wheels for RKNN #2041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build-wheels-aarch64-rknn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,17 @@ jobs:

ls -lh

git clone --depth 1 --branch v1.2.12 https://github.com/alsa-project/alsa-lib
pushd alsa-lib
./gitcompile
popd
sudo apt-get update -y
sudo apt-get install -y alsa-utils libasound2-dev

export SHERPA_ONNX_RKNN_TOOLKIT2_PATH=$PWD/rknn-toolkit2
export SHERPA_ONNX_RKNN_TOOLKIT2_LIB_DIR=$SHERPA_ONNX_RKNN_TOOLKIT2_PATH/rknpu2/runtime/Linux/librknn_api/aarch64
export CPLUS_INCLUDE_PATH=$SHERPA_ONNX_RKNN_TOOLKIT2_PATH/rknpu2/runtime/Linux/librknn_api/include:$CPLUS_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$PWD/alsa-lib/include:$CPLUS_INCLUDE_PATH
export SHERPA_ONNX_ALSA_LIB_DIR=$PWD/alsa-lib/src/.libs

export SHERPA_ONNX_CMAKE_ARGS="-DSHERPA_ONNX_ENABLE_RKNN=ON -DSHERPA_ONNX_ENABLE_ALSA=1"
python3 setup.py bdist_wheel
export SHERPA_ONNX_ENABLE_ALSA=1

export SHERPA_ONNX_CMAKE_ARGS="-DSHERPA_ONNX_ENABLE_RKNN=ON"
python3 setup.py bdist_wheel

- name: Display results
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions sherpa-onnx/csrc/sherpa-onnx-offline-denoiser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ to download models.
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/gtcrn_simple.onnx
./bin/sherpa-onnx-offline-denoiser \
--speech-denoiser-gtcrn-model=gtcrn_simple.onnx \
--input-wav input.wav \
--output-wav output_16k.wav
--input-wav=input.wav \
--output-wav=output_16k.wav
)usage";

sherpa_onnx::ParseOptions po(kUsageMessage);
Expand Down
Loading