Skip to content

Commit ea7206f

Browse files
authored
Add C++ API with ACL C API for SenseVoice ASR on Ascend NPU (#2728)
1 parent 4450c83 commit ea7206f

38 files changed

+1192
-92
lines changed

.github/workflows/build-wheels-win64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
os: [windows-latest]
29+
os: [windows-2022]
3030

3131
steps:
3232
- uses: actions/checkout@v4

.github/workflows/export-paraformer-to-ascend-npu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: export-paraformer-to-ascend-npu
33
on:
44
push:
55
branches:
6-
- ascend-npu-310
6+
- ascend-npu-acl-api-
77
workflow_dispatch:
88

99
concurrency:
@@ -167,7 +167,7 @@ jobs:
167167
168168
169169
echo "collect results"
170-
d=sherpa-onnx-ascend-910B-paraformer-zh-2023-03-28
170+
d=sherpa-onnx-ascend-${soc_version}-paraformer-zh-2023-03-28
171171
172172
mkdir -p $d
173173
mkdir -p $d/test_wavs

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [windows-latest]
23+
os: [windows-2022]
2424
total: ["3"]
2525
index: ["0", "1", "2"]
2626

@@ -125,7 +125,7 @@ jobs:
125125
strategy:
126126
fail-fast: false
127127
matrix:
128-
os: [windows-latest]
128+
os: [windows-2022]
129129
total: ["20"]
130130
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
131131

.github/workflows/jar.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- os: macos-13
3636
arch: "x64"
3737

38-
- os: windows-latest
38+
- os: windows-2022
3939
arch: "x64"
4040

4141
steps:
@@ -126,7 +126,7 @@ jobs:
126126
rm -rf $src*
127127
128128
- name: Download libs ${{ matrix.os }} ${{ matrix.arch }}
129-
if: ${{ matrix.os == 'windows-latest' && matrix.arch == 'x64' }}
129+
if: ${{ matrix.os == 'windows-2022' && matrix.arch == 'x64' }}
130130
shell: bash
131131
run: |
132132
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
@@ -181,7 +181,7 @@ jobs:
181181
mv -v sherpa-onnx-native.jar sherpa-onnx-native-lib-osx-aarch64-$SHERPA_ONNX_VERSION.jar
182182
elif [[ $os == "macos-13" && $arch == "x64" ]]; then
183183
mv -v sherpa-onnx-native.jar sherpa-onnx-native-lib-osx-x64-$SHERPA_ONNX_VERSION.jar
184-
elif [[ $os == "windows-latest" && $arch == "x64" ]]; then
184+
elif [[ $os == "windows-2022" && $arch == "x64" ]]; then
185185
mv -v sherpa-onnx-native.jar sherpa-onnx-native-lib-win-x64-$SHERPA_ONNX_VERSION.jar
186186
else
187187
echo "Unknown os $os with arch $arch"
@@ -218,7 +218,7 @@ jobs:
218218
file: ./sherpa-onnx/java-api/sherpa-onnx-native-*.jar
219219
repo_name: k2-fsa/sherpa-onnx
220220
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
221-
tag: v1.12.10
221+
tag: v1.12.15
222222

223223
- name: Test KittenTTS
224224
shell: bash
@@ -236,7 +236,7 @@ jobs:
236236
native_jar=sherpa-onnx-native-lib-osx-aarch64-$SHERPA_ONNX_VERSION.jar
237237
elif [[ $os == "macos-13" && $arch == "x64" ]]; then
238238
native_jar=sherpa-onnx-native-lib-osx-x64-$SHERPA_ONNX_VERSION.jar
239-
elif [[ $os == "windows-latest" && $arch == "x64" ]]; then
239+
elif [[ $os == "windows-2022" && $arch == "x64" ]]; then
240240
native_jar=sherpa-onnx-native-lib-win-x64-$SHERPA_ONNX_VERSION.jar
241241
else
242242
echo "Unknown os $os with arch $arch"
@@ -245,7 +245,7 @@ jobs:
245245
echo "native_jar: $native_jar"
246246
ls -lh sherpa-onnx/java-api/$native_jar
247247
248-
if [[ ${{ matrix.os }} == "windows-latest" ]]; then
248+
if [[ ${{ matrix.os }} == "windows-2022" ]]; then
249249
SEP=";"
250250
else
251251
SEP=":"

.github/workflows/lazarus.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
os: [ubuntu-22.04, macos-latest, macos-13, windows-latest]
33+
os: [ubuntu-22.04, macos-latest, macos-13, windows-2022]
3434

3535
steps:
3636
- uses: actions/checkout@v4
@@ -97,7 +97,7 @@ jobs:
9797
cd build
9898
os=${{ matrix.os }}
9999
100-
if [[ $os == 'windows-latest' || $os == 'ubuntu-22.04' ]]; then
100+
if [[ $os == 'windows-2022' || $os == 'ubuntu-22.04' ]]; then
101101
BUILD_SHARED_LIBS=ON
102102
else
103103
BUILD_SHARED_LIBS=OFF
@@ -173,7 +173,7 @@ jobs:
173173
ls -lh /tmp/linux-x64
174174
175175
- name: Collect generating subtitles (windows)
176-
if: matrix.os == 'windows-latest'
176+
if: matrix.os == 'windows-2022'
177177
shell: bash
178178
run: |
179179
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
@@ -234,7 +234,7 @@ jobs:
234234
path: /tmp/macos-x64
235235

236236
- uses: actions/upload-artifact@v4
237-
if: matrix.os == 'windows-latest'
237+
if: matrix.os == 'windows-2022'
238238
with:
239239
name: windows-x64
240240
path: ./windows-x64

.github/workflows/mfc.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
os: [windows-latest]
29+
os: [windows-2022]
3030
arch: [x64, x86]
3131

3232
steps:
@@ -125,6 +125,9 @@ jobs:
125125
file_glob: true
126126
overwrite: true
127127
file: ./mfc-examples/${{ matrix.arch }}/Release/sherpa-onnx-streaming-*.exe
128+
repo_name: k2-fsa/sherpa-onnx
129+
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
130+
tag: v1.12.15
128131

129132
- name: Release pre-compiled binaries and libs for Windows ${{ matrix.arch }}
130133
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@@ -133,6 +136,9 @@ jobs:
133136
file_glob: true
134137
overwrite: true
135138
file: ./mfc-examples/${{ matrix.arch }}/Release/sherpa-onnx-non-streaming-*.exe
139+
repo_name: k2-fsa/sherpa-onnx
140+
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
141+
tag: v1.12.15
136142

137143
- name: Release pre-compiled binaries and libs for Windows ${{ matrix.arch }}
138144
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@@ -141,3 +147,6 @@ jobs:
141147
file_glob: true
142148
overwrite: true
143149
file: ./mfc-examples/${{ matrix.arch }}/sherpa-onnx-non-streaming-*.exe
150+
repo_name: k2-fsa/sherpa-onnx
151+
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
152+
tag: v1.12.15

.github/workflows/pascal.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
os: [ubuntu-latest, macos-latest, macos-13, windows-latest, ubuntu-22.04-arm]
30+
os: [ubuntu-latest, macos-latest, macos-13, windows-2022, ubuntu-22.04-arm]
3131

3232
steps:
3333
- uses: actions/checkout@v4
@@ -60,7 +60,7 @@ jobs:
6060
# brew install --cask lazarus
6161
#
6262
- name: Install Free pascal compiler (windows)
63-
if: matrix.os == 'windows-latest'
63+
if: matrix.os == 'windows-2022'
6464
shell: bash
6565
run: |
6666
choco install lazarus
@@ -106,7 +106,7 @@ jobs:
106106
107107
ls -lh install/lib/
108108
109-
if [[ ${{ matrix.os }} == 'windows-latest' ]]; then
109+
if [[ ${{ matrix.os }} == 'windows-2022' ]]; then
110110
cp -v install/lib/*.dll ../pascal-api-examples/non-streaming-asr
111111
cp -v install/lib/*.dll ../pascal-api-examples/read-wav
112112
cp -v install/lib/*.dll ../pascal-api-examples/speaker-diarization
@@ -147,7 +147,7 @@ jobs:
147147
rm -rf sherpa-onnx-*
148148
echo "---"
149149
150-
if [[ ${{ matrix.os }} != 'windows-latest' ]]; then
150+
if [[ ${{ matrix.os }} != 'windows-2022' ]]; then
151151
./run-paraformer.sh
152152
rm -rf sherpa-onnx-*
153153
echo "---"

.github/workflows/test-build-wheel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
python-version: "3.11"
8181
- os: windows-2022
8282
python-version: "3.12"
83-
- os: windows-latest
83+
- os: windows-2022
8484
python-version: "3.13"
8585

8686
steps:

.github/workflows/test-dart-package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm] #, windows-latest]
26+
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm] #, windows-2022]
2727

2828
steps:
2929
- uses: actions/checkout@v4

.github/workflows/test-dart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm] #, windows-latest]
27+
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm] #, windows-2022]
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -89,7 +89,7 @@ jobs:
8989
os=linux-aarch64
9090
elif [[ ${{ matrix.os }} == macos-latest ]]; then
9191
os=macos
92-
elif [[ ${{ matrix.os }} == windows-latest ]]; then
92+
elif [[ ${{ matrix.os }} == windows-2022 ]]; then
9393
os=windows
9494
fi
9595

0 commit comments

Comments
 (0)