-
Notifications
You must be signed in to change notification settings - Fork 445
284 lines (220 loc) · 6.83 KB
/
pascal.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
name: pascal
on:
push:
branches:
- master
paths:
- '.github/workflows/pascal.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'pascal-api-examples/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'sherpa-onnx/pascal-api/*'
pull_request:
branches:
- master
paths:
- '.github/workflows/pascal.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'pascal-api-examples/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'sherpa-onnx/pascal-api/*'
workflow_dispatch:
concurrency:
group: pascal-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
pascal:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}
- name: Install Free pascal compiler (ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -q -y fpc
- name: Install Free pascal compiler (macos)
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
shell: bash
run: |
brew install fpc
# brew install --cask lazarus
#
- name: Install Free pascal compiler (windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
choco install lazarus
ls -lh /c/lazarus/fpc/3.2.2/bin/x86_64-win64/
- name: FPC info
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
which fpc
fpc -i
- name: OS info
shell: bash
run: |
uname -a
- name: Configure CMake
shell: bash
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=./install \
-D BUILD_SHARED_LIBS=ON \
-D SHERPA_ONNX_ENABLE_BINARY=OFF \
-D CMAKE_BUILD_TYPE=Release \
..
- name: Build sherpa-onnx
shell: bash
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cd build
cmake --build . --target install --config Release
ls -lh install/lib/
if [[ ${{ matrix.os }} == 'windows-latest' ]]; then
cp -v install/lib/*.dll ../pascal-api-examples/read-wav
cp -v install/lib/*.dll ../pascal-api-examples/streaming-asr
cp -v install/lib/*.dll ../pascal-api-examples/non-streaming-asr
cp -v install/lib/*.dll ../pascal-api-examples/vad
cp -v install/lib/*.dll ../pascal-api-examples/vad-with-non-streaming-asr
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/read-wav
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/streaming-asr
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/non-streaming-asr
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/vad
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/vad-with-non-streaming-asr
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/tts
fi
- name: Run Pascal test (Speaker diarization)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd speaker-diarization
./run.sh
rm -rfv *.onnx *.wav sherpa-onnx-*
ls -lh
echo "---"
popd
- name: Run Pascal test (TTS)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd tts
./run-piper.sh
rm -rf vits-piper-*
ls -lh
echo "---"
popd
- name: Run Pascal test (VAD + non-streaming ASR)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd vad-with-non-streaming-asr
time ./run-vad-with-whisper.sh
rm -rf sherpa-onnx-*
echo "---"
time ./run-vad-with-sense-voice.sh
rm -rf sherpa-onnx-*
echo "---"
ls -lh
popd
- name: Run Pascal test (VAD test)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd vad
./run-circular-buffer.sh
echo "---"
time ./run-remove-silence.sh
echo "---"
ls -lh
popd
- name: Run Pascal test (Read wav test)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd read-wav
./run.sh
echo "---"
ls -lh
popd
- name: Run Pascal test (Non Streaming ASR)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd non-streaming-asr
./run-zipformer-transducer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-whisper.sh
rm -rf sherpa-onnx-*
echo "---"
./run-nemo-transducer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-nemo-ctc.sh
rm -rf sherpa-onnx-*
echo "---"
./run-sense-voice.sh
rm -rf sherpa-onnx-*
echo "---"
./run-telespeech-ctc.sh
rm -rf sherpa-onnx-*
echo "---"
./run-paraformer.sh
./run-paraformer-itn.sh
rm -rf sherpa-onnx-*
echo "---"
ls -lh
popd
- name: Run Pascal test (Streaming ASR)
shell: bash
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd streaming-asr
./run-zipformer-transducer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-nemo-transducer.sh
rm -rf sherpa-onnx-*
echo "---"
if [[ ${{ matrix.os }} != 'windows-latest' ]]; then
./run-paraformer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-zipformer-ctc.sh
echo "---"
./run-zipformer-ctc-hlg.sh
rm -rf sherpa-onnx-*
echo "---"
fi
ls -lh
popd