Skip to content

Commit d6fc383

Browse files
committed
Fix JNI
1 parent 4a49d13 commit d6fc383

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/windows-x64-jni.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ jobs:
122122
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
123123
124124
- name: Release pre-compiled binaries and libs for Windows x64
125-
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
125+
# if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
126126
uses: svenstaro/upload-release-action@v2
127127
with:
128128
file_glob: true
129129
overwrite: true
130130
file: sherpa-onnx-*.tar.bz2
131-
# repo_name: k2-fsa/sherpa-onnx
132-
# repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
133-
# tag: v1.12.0
131+
repo_name: k2-fsa/sherpa-onnx
132+
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
133+
tag: v1.12.18

sherpa-onnx/jni/common.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ namespace sherpa_onnx {
1515
1616
https://workbench.aihub.qualcomm.com/docs/hub/faq.html#why-am-i-seeing-error-1008-when-trying-to-use-htp
1717
*/
18+
#if defined(_WIN32)
19+
void PrependAdspLibraryPath(const std::string &new_path) {
20+
SHERPA_ONNX_LOGE("This function is not for Windows. Ignore it");
21+
}
22+
#else
1823
void PrependAdspLibraryPath(const std::string &new_path) {
1924
const char *old_path = getenv("ADSP_LIBRARY_PATH");
2025
std::string updated_path;
@@ -43,5 +48,6 @@ Successfully set ADSP_LIBRARY_PATH to
4348
4449
*/
4550
}
51+
#endif
4652

4753
} // namespace sherpa_onnx

0 commit comments

Comments
 (0)