Skip to content

Commit 42aa0b8

Browse files
authored
Use onnxruntime 1.23.2 for Windows (#3007)
1 parent 5f12b08 commit 42aa0b8

15 files changed

Lines changed: 81 additions & 73 deletions

.github/scripts/test-offline-ctc.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ rm -rf sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24
8080
log "------------------------------------------------------------"
8181
log "Run SenseVoice models"
8282
log "------------------------------------------------------------"
83-
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
84-
tar xvf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
85-
rm sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
86-
repo=sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17
83+
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
84+
tar xvf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
85+
rm sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
86+
repo=sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17
8787

88-
for m in model.onnx model.int8.onnx; do
88+
for m in model.int8.onnx; do
8989
for w in zh en yue ja ko; do
9090
for use_itn in 0 1; do
9191
echo "$m $w $use_itn"
@@ -106,7 +106,7 @@ curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/rep
106106
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/test-hr.wav
107107
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/lexicon.txt
108108

109-
for m in model.onnx model.int8.onnx; do
109+
for m in model.int8.onnx; do
110110
for use_itn in 0 1; do
111111
echo "$m $w $use_itn"
112112
time $EXE \

.github/workflows/windows-arm64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
-A ARM64 \
4949
-DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} \
5050
-D CMAKE_BUILD_TYPE=Release \
51+
-D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
5152
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
5253
-D CMAKE_INSTALL_PREFIX=./install \
5354
-D BUILD_ESPEAK_NG_EXE=OFF \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
cd build
5353
cmake \
5454
-A x64 \
55+
-D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
5556
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
5657
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
5758
-D CMAKE_INSTALL_PREFIX=./install \

.github/workflows/windows-x64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
cmake \
6060
-A x64 \
6161
-DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} \
62+
-D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
6263
-D CMAKE_BUILD_TYPE=Release \
6364
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
6465
-DCMAKE_INSTALL_PREFIX=./install \

.github/workflows/windows-x86-debug.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
cd build
5353
cmake \
5454
-A Win32 \
55+
-D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
5556
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
5657
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
5758
-D CMAKE_INSTALL_PREFIX=./install ..

.github/workflows/windows-x86.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
-A Win32 \
6161
-DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} \
6262
-D CMAKE_BUILD_TYPE=Release \
63+
-D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \
6364
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
6465
-D CMAKE_INSTALL_PREFIX=./install \
6566
..

cmake/onnxruntime-win-arm64-static.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL Release)
1919
message(FATAL_ERROR "This file is for building a release version on Windows arm64")
2020
endif()
2121

22-
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.1/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2")
23-
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2")
24-
set(onnxruntime_HASH "SHA256=534ab5bb8b5495ce45fed866cf3ec9034f89f2057a0152e49120b1088003a17e")
22+
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.23.2/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2")
23+
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/1.23.2/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2")
24+
set(onnxruntime_HASH "SHA256=d3d1a6dd8e886e47f00e17dea521642b029c04936e52673109ef3063b31ad708")
2525

2626
# If you don't have access to the Internet,
2727
# please download onnxruntime to one of the following locations.
2828
# You can add more if you want.
2929
set(possible_file_locations
30-
$ENV{HOME}/Downloads/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2
31-
${CMAKE_SOURCE_DIR}/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2
32-
${CMAKE_BINARY_DIR}/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2
33-
/tmp/onnxruntime-win-arm64-static_lib-1.17.1.tar.bz2
30+
$ENV{HOME}/Downloads/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2
31+
${CMAKE_SOURCE_DIR}/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2
32+
${CMAKE_BINARY_DIR}/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2
33+
/tmp/onnxruntime-win-arm64-static_lib-1.23.2.tar.bz2
3434
)
3535

3636
foreach(f IN LISTS possible_file_locations)

cmake/onnxruntime-win-arm64.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ if(NOT BUILD_SHARED_LIBS)
1515
message(FATAL_ERROR "This file is for building shared libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
1616
endif()
1717

18-
set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-win-arm64-1.17.1.zip")
19-
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-win-arm64-1.17.1.zip")
20-
set(onnxruntime_HASH "SHA256=47782cebcab0fd7a1f0a3f0676b088c1bc0f4fbf21666f6fe57570dc362fa5a8")
18+
set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.23.2/onnxruntime-win-arm64-1.23.2.zip")
19+
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/1.23.2/onnxruntime-win-arm64-1.23.2.zip")
20+
set(onnxruntime_HASH "SHA256=1cfe88b6435df3b5fb0e9f6bd7d6f5df1e887b6174de7f6e2a47bab956f3f168")
2121

2222
# If you don't have access to the Internet,
2323
# please download onnxruntime to one of the following locations.
2424
# You can add more if you want.
2525
set(possible_file_locations
26-
$ENV{HOME}/Downloads/onnxruntime-win-arm64-1.17.1.zip
27-
${CMAKE_SOURCE_DIR}/onnxruntime-win-arm64-1.17.1.zip
28-
${CMAKE_BINARY_DIR}/onnxruntime-win-arm64-1.17.1.zip
29-
/tmp/onnxruntime-win-arm64-1.17.1.zip
26+
$ENV{HOME}/Downloads/onnxruntime-win-arm64-1.23.2.zip
27+
${CMAKE_SOURCE_DIR}/onnxruntime-win-arm64-1.23.2.zip
28+
${CMAKE_BINARY_DIR}/onnxruntime-win-arm64-1.23.2.zip
29+
/tmp/onnxruntime-win-arm64-1.23.2.zip
3030
)
3131

3232
foreach(f IN LISTS possible_file_locations)

cmake/onnxruntime-win-x64-gpu.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@ if(NOT SHERPA_ONNX_ENABLE_GPU)
1919
message(FATAL_ERROR "This file is for NVIDIA GPU only. Given SHERPA_ONNX_ENABLE_GPU: ${SHERPA_ONNX_ENABLE_GPU}")
2020
endif()
2121

22-
set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-win-x64-gpu-1.17.1.zip")
23-
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-win-x64-gpu-1.17.1.zip")
24-
set(onnxruntime_HASH "SHA256=b7a66f50ad146c2ccb43471d2d3b5ad78084c2d4ddbd3ea82d65f86c867408b2")
22+
# Requires cuda 12.x, cudnn 9.x
23+
set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.23.2/onnxruntime-win-x64-gpu-1.23.2.zip")
24+
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/1.23.2/onnxruntime-win-x64-gpu-1.23.2.zip")
25+
set(onnxruntime_HASH "SHA256=e77afdbbc2b8cb6da4e5a50d89841b48c44f3e47dce4fb87b15a2743786d0bb9")
2526

2627
# If you don't have access to the Internet,
2728
# please download onnxruntime to one of the following locations.
2829
# You can add more if you want.
2930
set(possible_file_locations
30-
$ENV{HOME}/Downloads/onnxruntime-win-x64-gpu-1.17.1.zip
31-
${CMAKE_SOURCE_DIR}/onnxruntime-win-x64-gpu-1.17.1.zip
32-
${CMAKE_BINARY_DIR}/onnxruntime-win-x64-gpu-1.17.1.zip
33-
/tmp/onnxruntime-win-x64-gpu-1.17.1.zip
31+
$ENV{HOME}/Downloads/onnxruntime-win-x64-gpu-1.23.2.zip
32+
${CMAKE_SOURCE_DIR}/onnxruntime-win-x64-gpu-1.23.2.zip
33+
${CMAKE_BINARY_DIR}/onnxruntime-win-x64-gpu-1.23.2.zip
34+
/tmp/onnxruntime-win-x64-gpu-1.23.2.zip
3435
)
3536

3637
foreach(f IN LISTS possible_file_locations)

cmake/onnxruntime-win-x64-static-debug.cmake

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ if(BUILD_SHARED_LIBS)
1515
message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
1616
endif()
1717

18-
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.1/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2")
19-
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2")
18+
set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.23.2/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2")
19+
set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2")
2020
if(CMAKE_BUILD_TYPE STREQUAL Debug)
21-
set(onnxruntime_HASH "SHA256=ecc68d914541c3b6ebc36148af63fe2a6af0f4f955b35199d612698d23169fa5")
21+
set(onnxruntime_HASH "SHA256=5990f20c799a01d5397129b3e792c0b0a8e61deea6b46dffef61aa3d7315b6af")
2222
elseif(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
23-
set(onnxruntime_HASH "SHA256=7cbe58273e55d033568f84fb16d220cea4e25ec29eb7db405c4ac7b6e41f2dfa")
23+
set(onnxruntime_HASH "SHA256=1c923107630ffbd045115157b44f2e415cc553d64811a5399009208683ebcf58")
2424
elseif(CMAKE_BUILD_TYPE STREQUAL MinSizeRel)
25-
set(onnxruntime_HASH "SHA256=9eb3adf0f6ac3b0e9f118e0d9e686f50fc651394e0b0cc569275af6e3ffed0e0")
25+
set(onnxruntime_HASH "SHA256=0ceab7ac41b220d43bbcb0826e8ecd6294669fd3a13b8643e40dd3c9db2ef896")
2626
else()
2727
message(FATAL_ERROR "This file is for building a debug version on Windows x64. Given ${CMAKE_BUILD_TYPE}")
2828
endif()
@@ -31,10 +31,10 @@ endif()
3131
# please download onnxruntime to one of the following locations.
3232
# You can add more if you want.
3333
set(possible_file_locations
34-
$ENV{HOME}/Downloads/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2
35-
${CMAKE_SOURCE_DIR}/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2
36-
${CMAKE_BINARY_DIR}/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2
37-
/tmp/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.17.1.tar.bz2
34+
$ENV{HOME}/Downloads/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2
35+
${CMAKE_SOURCE_DIR}/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2
36+
${CMAKE_BINARY_DIR}/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2
37+
/tmp/onnxruntime-win-x64-static_lib-${CMAKE_BUILD_TYPE}-1.23.2.tar.bz2
3838
)
3939

4040
foreach(f IN LISTS possible_file_locations)

0 commit comments

Comments
 (0)