Skip to content

Commit 168923f

Browse files
committed
Update CI
1 parent 2dc4d43 commit 168923f

File tree

3 files changed

+60
-22
lines changed

3 files changed

+60
-22
lines changed

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

+34
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,40 @@ which $EXE
1818
# test waves are saved in ./tts
1919
mkdir ./tts
2020

21+
log "------------------------------------------------------------"
22+
log "matcha-icefall-zh-baker"
23+
log "------------------------------------------------------------"
24+
curl -O -SL https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
25+
tar xvf matcha-icefall-zh-baker.tar.bz2
26+
rm matcha-icefall-zh-baker.tar.bz2
27+
28+
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
29+
30+
./build/bin/sherpa-onnx-offline-tts \
31+
--matcha-acoustic-model=./matcha-icefall-zh-baker/model-steps-3.onnx \
32+
--matcha-vocoder=./hifigan_v2.onnx \
33+
--matcha-lexicon=./matcha-icefall-zh-baker/lexicon.txt \
34+
--matcha-tokens=./matcha-icefall-zh-baker/tokens.txt \
35+
--matcha-dict-dir=./matcha-icefall-zh-baker/dict \
36+
--num-threads=2 \
37+
--debug=1 \
38+
--output-filename=./tts/matcha-baker-zh-1.wav \
39+
'小米的使命是,始终坚持做"感动人心、价格厚道"的好产品,让全球每个人都能享受科技带来的美好生活'
40+
41+
./build/bin/sherpa-onnx-offline-tts \
42+
--matcha-acoustic-model=./matcha-icefall-zh-baker/model-steps-3.onnx \
43+
--matcha-vocoder=./hifigan_v2.onnx \
44+
--matcha-lexicon=./matcha-icefall-zh-baker/lexicon.txt \
45+
--matcha-tokens=./matcha-icefall-zh-baker/tokens.txt \
46+
--matcha-dict-dir=./matcha-icefall-zh-baker/dict \
47+
--num-threads=2 \
48+
--debug=1 \
49+
--output-filename=./tts/matcha-baker-zh-2.wav \
50+
"当夜幕降临,星光点点,伴随着微风拂面,我在静谧中感受着时光的流转,思念如涟漪荡漾,梦境如画卷展开,我与自然融为一体,沉静在这片宁静的美丽之中,感受着生命的奇迹与温柔。"
51+
52+
rm hifigan_v2.onnx
53+
rm -rf matcha-icefall-zh-baker
54+
2155
log "------------------------------------------------------------"
2256
log "vits-piper-en_US-amy-low"
2357
log "------------------------------------------------------------"

.github/workflows/linux.yaml

+17-13
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ jobs:
149149
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
150150
path: install/*
151151

152+
- name: Test offline TTS
153+
if: matrix.with_tts == 'ON'
154+
shell: bash
155+
run: |
156+
du -h -d1 .
157+
export PATH=$PWD/build/bin:$PATH
158+
export EXE=sherpa-onnx-offline-tts
159+
160+
.github/scripts/test-offline-tts.sh
161+
du -h -d1 .
162+
163+
- uses: actions/upload-artifact@v4
164+
if: matrix.with_tts == 'ON'
165+
with:
166+
name: tts-generated-test-files-${{ matrix.build_type }}-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
167+
path: tts
168+
152169
- name: Test offline Moonshine
153170
if: matrix.build_type != 'Debug'
154171
shell: bash
@@ -309,16 +326,7 @@ jobs:
309326
.github/scripts/test-offline-whisper.sh
310327
du -h -d1 .
311328
312-
- name: Test offline TTS
313-
if: matrix.with_tts == 'ON'
314-
shell: bash
315-
run: |
316-
du -h -d1 .
317-
export PATH=$PWD/build/bin:$PATH
318-
export EXE=sherpa-onnx-offline-tts
319329
320-
.github/scripts/test-offline-tts.sh
321-
du -h -d1 .
322330
323331
- name: Test online paraformer
324332
shell: bash
@@ -367,8 +375,4 @@ jobs:
367375
overwrite: true
368376
file: sherpa-onnx-*.tar.bz2
369377

370-
- uses: actions/upload-artifact@v4
371-
with:
372-
name: tts-generated-test-files-${{ matrix.build_type }}-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
373-
path: tts
374378

.github/workflows/macos.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ jobs:
121121
otool -L build/bin/sherpa-onnx
122122
otool -l build/bin/sherpa-onnx
123123
124+
- name: Test offline TTS
125+
if: matrix.with_tts == 'ON'
126+
shell: bash
127+
run: |
128+
export PATH=$PWD/build/bin:$PATH
129+
export EXE=sherpa-onnx-offline-tts
130+
131+
.github/scripts/test-offline-tts.sh
132+
124133
- name: Test offline Moonshine
125134
if: matrix.build_type != 'Debug'
126135
shell: bash
@@ -226,15 +235,6 @@ jobs:
226235
227236
.github/scripts/test-kws.sh
228237
229-
- name: Test offline TTS
230-
if: matrix.with_tts == 'ON'
231-
shell: bash
232-
run: |
233-
export PATH=$PWD/build/bin:$PATH
234-
export EXE=sherpa-onnx-offline-tts
235-
236-
.github/scripts/test-offline-tts.sh
237-
238238
- name: Test online paraformer
239239
shell: bash
240240
run: |

0 commit comments

Comments
 (0)