正在显示
27 个修改的文件
包含
159 行增加
和
173 行删除
| @@ -149,27 +149,19 @@ jobs: | @@ -149,27 +149,19 @@ jobs: | ||
| 149 | go build | 149 | go build |
| 150 | ls -lh | 150 | ls -lh |
| 151 | 151 | ||
| 152 | - git lfs install | ||
| 153 | - | ||
| 154 | echo "Test vits-ljs" | 152 | echo "Test vits-ljs" |
| 155 | - git clone https://huggingface.co/csukuangfj/vits-ljs | ||
| 156 | ./run-vits-ljs.sh | 153 | ./run-vits-ljs.sh |
| 157 | rm -rf vits-ljs | 154 | rm -rf vits-ljs |
| 158 | 155 | ||
| 159 | echo "Test vits-vctk" | 156 | echo "Test vits-vctk" |
| 160 | - git clone https://huggingface.co/csukuangfj/vits-vctk | ||
| 161 | ./run-vits-vctk.sh | 157 | ./run-vits-vctk.sh |
| 162 | rm -rf vits-vctk | 158 | rm -rf vits-vctk |
| 163 | 159 | ||
| 164 | echo "Test vits-icefall-zh-aishell3" | 160 | echo "Test vits-icefall-zh-aishell3" |
| 165 | - curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2 | ||
| 166 | - tar xvf vits-icefall-zh-aishell3.tar.bz2 | ||
| 167 | - rm vits-icefall-zh-aishell3.tar.bz2 | ||
| 168 | ./run-vits-zh-aishell3.sh | 161 | ./run-vits-zh-aishell3.sh |
| 169 | - rm -rf vits-icefall-zh-aishell3* | 162 | + rm -rf vits-icefall-zh-aishell3 |
| 170 | 163 | ||
| 171 | echo "Test vits-piper-en_US-lessac-medium" | 164 | echo "Test vits-piper-en_US-lessac-medium" |
| 172 | - git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium | ||
| 173 | ./run-vits-piper-en_US-lessac-medium.sh | 165 | ./run-vits-piper-en_US-lessac-medium.sh |
| 174 | rm -rf vits-piper-en_US-lessac-medium | 166 | rm -rf vits-piper-en_US-lessac-medium |
| 175 | 167 | ||
| @@ -194,25 +186,19 @@ jobs: | @@ -194,25 +186,19 @@ jobs: | ||
| 194 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . | 186 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . |
| 195 | ls -lh | 187 | ls -lh |
| 196 | 188 | ||
| 197 | - git lfs install | ||
| 198 | - | ||
| 199 | echo "Test vits-ljs" | 189 | echo "Test vits-ljs" |
| 200 | - git clone https://huggingface.co/csukuangfj/vits-ljs | ||
| 201 | ./run-vits-ljs.sh | 190 | ./run-vits-ljs.sh |
| 202 | rm -rf vits-ljs | 191 | rm -rf vits-ljs |
| 203 | 192 | ||
| 204 | echo "Test vits-vctk" | 193 | echo "Test vits-vctk" |
| 205 | - git clone https://huggingface.co/csukuangfj/vits-vctk | ||
| 206 | ./run-vits-vctk.sh | 194 | ./run-vits-vctk.sh |
| 207 | rm -rf vits-vctk | 195 | rm -rf vits-vctk |
| 208 | 196 | ||
| 209 | echo "Test vits-zh-aishell3" | 197 | echo "Test vits-zh-aishell3" |
| 210 | - git clone https://huggingface.co/csukuangfj/vits-zh-aishell3 | ||
| 211 | ./run-vits-zh-aishell3.sh | 198 | ./run-vits-zh-aishell3.sh |
| 212 | - rm -rf vits-zh-aishell3 | 199 | + rm -rf vits-icefall-zh-aishell3 |
| 213 | 200 | ||
| 214 | echo "Test vits-piper-en_US-lessac-medium" | 201 | echo "Test vits-piper-en_US-lessac-medium" |
| 215 | - git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium | ||
| 216 | ./run-vits-piper-en_US-lessac-medium.sh | 202 | ./run-vits-piper-en_US-lessac-medium.sh |
| 217 | rm -rf vits-piper-en_US-lessac-medium | 203 | rm -rf vits-piper-en_US-lessac-medium |
| 218 | 204 | ||
| @@ -245,25 +231,19 @@ jobs: | @@ -245,25 +231,19 @@ jobs: | ||
| 245 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . | 231 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . |
| 246 | ls -lh | 232 | ls -lh |
| 247 | 233 | ||
| 248 | - git lfs install | ||
| 249 | - | ||
| 250 | echo "Test vits-ljs" | 234 | echo "Test vits-ljs" |
| 251 | - git clone https://huggingface.co/csukuangfj/vits-ljs | ||
| 252 | ./run-vits-ljs.sh | 235 | ./run-vits-ljs.sh |
| 253 | rm -rf vits-ljs | 236 | rm -rf vits-ljs |
| 254 | 237 | ||
| 255 | echo "Test vits-vctk" | 238 | echo "Test vits-vctk" |
| 256 | - git clone https://huggingface.co/csukuangfj/vits-vctk | ||
| 257 | ./run-vits-vctk.sh | 239 | ./run-vits-vctk.sh |
| 258 | rm -rf vits-vctk | 240 | rm -rf vits-vctk |
| 259 | 241 | ||
| 260 | echo "Test vits-zh-aishell3" | 242 | echo "Test vits-zh-aishell3" |
| 261 | - git clone https://huggingface.co/csukuangfj/vits-zh-aishell3 | ||
| 262 | ./run-vits-zh-aishell3.sh | 243 | ./run-vits-zh-aishell3.sh |
| 263 | rm -rf vits-zh-aishell3 | 244 | rm -rf vits-zh-aishell3 |
| 264 | 245 | ||
| 265 | echo "Test vits-piper-en_US-lessac-medium" | 246 | echo "Test vits-piper-en_US-lessac-medium" |
| 266 | - git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium | ||
| 267 | ./run-vits-piper-en_US-lessac-medium.sh | 247 | ./run-vits-piper-en_US-lessac-medium.sh |
| 268 | rm -rf vits-piper-en_US-lessac-medium | 248 | rm -rf vits-piper-en_US-lessac-medium |
| 269 | 249 | ||
| @@ -281,33 +261,23 @@ jobs: | @@ -281,33 +261,23 @@ jobs: | ||
| 281 | go build | 261 | go build |
| 282 | ls -lh | 262 | ls -lh |
| 283 | 263 | ||
| 284 | - git lfs install | ||
| 285 | - | ||
| 286 | echo "Test transducer" | 264 | echo "Test transducer" |
| 287 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 | ||
| 288 | ./run-transducer.sh | 265 | ./run-transducer.sh |
| 289 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 | 266 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 |
| 290 | 267 | ||
| 291 | echo "Test paraformer" | 268 | echo "Test paraformer" |
| 292 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 | ||
| 293 | ./run-paraformer.sh | 269 | ./run-paraformer.sh |
| 294 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 | 270 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 |
| 295 | 271 | ||
| 296 | echo "Test NeMo CTC" | 272 | echo "Test NeMo CTC" |
| 297 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium | ||
| 298 | ./run-nemo-ctc.sh | 273 | ./run-nemo-ctc.sh |
| 299 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium | 274 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium |
| 300 | 275 | ||
| 301 | echo "Test Whisper tiny.en" | 276 | echo "Test Whisper tiny.en" |
| 302 | - GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en | ||
| 303 | - cd sherpa-onnx-whisper-tiny.en | ||
| 304 | - git lfs pull --include "*.onnx" | ||
| 305 | - cd .. | ||
| 306 | ./run-whisper.sh | 277 | ./run-whisper.sh |
| 307 | rm -rf sherpa-onnx-whisper-tiny.en | 278 | rm -rf sherpa-onnx-whisper-tiny.en |
| 308 | 279 | ||
| 309 | echo "Test Tdnn yesno" | 280 | echo "Test Tdnn yesno" |
| 310 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno | ||
| 311 | ./run-tdnn-yesno.sh | 281 | ./run-tdnn-yesno.sh |
| 312 | rm -rf sherpa-onnx-tdnn-yesno | 282 | rm -rf sherpa-onnx-tdnn-yesno |
| 313 | 283 | ||
| @@ -328,33 +298,23 @@ jobs: | @@ -328,33 +298,23 @@ jobs: | ||
| 328 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . | 298 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . |
| 329 | ls -lh | 299 | ls -lh |
| 330 | 300 | ||
| 331 | - git lfs install | ||
| 332 | - | ||
| 333 | echo "Test transducer" | 301 | echo "Test transducer" |
| 334 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 | ||
| 335 | ./run-transducer.sh | 302 | ./run-transducer.sh |
| 336 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 | 303 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 |
| 337 | 304 | ||
| 338 | echo "Test paraformer" | 305 | echo "Test paraformer" |
| 339 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 | ||
| 340 | ./run-paraformer.sh | 306 | ./run-paraformer.sh |
| 341 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 | 307 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 |
| 342 | 308 | ||
| 343 | echo "Test NeMo CTC" | 309 | echo "Test NeMo CTC" |
| 344 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium | ||
| 345 | ./run-nemo-ctc.sh | 310 | ./run-nemo-ctc.sh |
| 346 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium | 311 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium |
| 347 | 312 | ||
| 348 | echo "Test Whisper tiny.en" | 313 | echo "Test Whisper tiny.en" |
| 349 | - GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en | ||
| 350 | - cd sherpa-onnx-whisper-tiny.en | ||
| 351 | - git lfs pull --include "*.onnx" | ||
| 352 | - cd .. | ||
| 353 | ./run-whisper.sh | 314 | ./run-whisper.sh |
| 354 | rm -rf sherpa-onnx-whisper-tiny.en | 315 | rm -rf sherpa-onnx-whisper-tiny.en |
| 355 | 316 | ||
| 356 | echo "Test Tdnn yesno" | 317 | echo "Test Tdnn yesno" |
| 357 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno | ||
| 358 | ./run-tdnn-yesno.sh | 318 | ./run-tdnn-yesno.sh |
| 359 | rm -rf sherpa-onnx-tdnn-yesno | 319 | rm -rf sherpa-onnx-tdnn-yesno |
| 360 | 320 | ||
| @@ -383,33 +343,23 @@ jobs: | @@ -383,33 +343,23 @@ jobs: | ||
| 383 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . | 343 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . |
| 384 | ls -lh | 344 | ls -lh |
| 385 | 345 | ||
| 386 | - git lfs install | ||
| 387 | - | ||
| 388 | echo "Test transducer" | 346 | echo "Test transducer" |
| 389 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 | ||
| 390 | ./run-transducer.sh | 347 | ./run-transducer.sh |
| 391 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 | 348 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 |
| 392 | 349 | ||
| 393 | echo "Test paraformer" | 350 | echo "Test paraformer" |
| 394 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 | ||
| 395 | ./run-paraformer.sh | 351 | ./run-paraformer.sh |
| 396 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 | 352 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 |
| 397 | 353 | ||
| 398 | echo "Test NeMo CTC" | 354 | echo "Test NeMo CTC" |
| 399 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium | ||
| 400 | ./run-nemo-ctc.sh | 355 | ./run-nemo-ctc.sh |
| 401 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium | 356 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium |
| 402 | 357 | ||
| 403 | echo "Test Whisper tiny.en" | 358 | echo "Test Whisper tiny.en" |
| 404 | - GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en | ||
| 405 | - cd sherpa-onnx-whisper-tiny.en | ||
| 406 | - git lfs pull --include "*.onnx" | ||
| 407 | - cd .. | ||
| 408 | ./run-whisper.sh | 359 | ./run-whisper.sh |
| 409 | rm -rf sherpa-onnx-whisper-tiny.en | 360 | rm -rf sherpa-onnx-whisper-tiny.en |
| 410 | 361 | ||
| 411 | echo "Test Tdnn yesno" | 362 | echo "Test Tdnn yesno" |
| 412 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno | ||
| 413 | ./run-tdnn-yesno.sh | 363 | ./run-tdnn-yesno.sh |
| 414 | rm -rf sherpa-onnx-tdnn-yesno | 364 | rm -rf sherpa-onnx-tdnn-yesno |
| 415 | 365 | ||
| @@ -424,15 +374,11 @@ jobs: | @@ -424,15 +374,11 @@ jobs: | ||
| 424 | go build | 374 | go build |
| 425 | ls -lh | 375 | ls -lh |
| 426 | 376 | ||
| 427 | - git lfs install | ||
| 428 | - | ||
| 429 | echo "Test transducer" | 377 | echo "Test transducer" |
| 430 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 | ||
| 431 | ./run-transducer.sh | 378 | ./run-transducer.sh |
| 432 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 | 379 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 |
| 433 | 380 | ||
| 434 | echo "Test paraformer" | 381 | echo "Test paraformer" |
| 435 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 436 | ./run-paraformer.sh | 382 | ./run-paraformer.sh |
| 437 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en | 383 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en |
| 438 | 384 | ||
| @@ -453,15 +399,11 @@ jobs: | @@ -453,15 +399,11 @@ jobs: | ||
| 453 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . | 399 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll . |
| 454 | ls -lh | 400 | ls -lh |
| 455 | 401 | ||
| 456 | - git lfs install | ||
| 457 | - | ||
| 458 | echo "Test transducer" | 402 | echo "Test transducer" |
| 459 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 | ||
| 460 | ./run-transducer.sh | 403 | ./run-transducer.sh |
| 461 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 | 404 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 |
| 462 | 405 | ||
| 463 | echo "Test paraformer" | 406 | echo "Test paraformer" |
| 464 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 465 | ./run-paraformer.sh | 407 | ./run-paraformer.sh |
| 466 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en | 408 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en |
| 467 | 409 | ||
| @@ -491,15 +433,11 @@ jobs: | @@ -491,15 +433,11 @@ jobs: | ||
| 491 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . | 433 | cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll . |
| 492 | ls -lh | 434 | ls -lh |
| 493 | 435 | ||
| 494 | - git lfs install | ||
| 495 | - | ||
| 496 | echo "Test transducer" | 436 | echo "Test transducer" |
| 497 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 | ||
| 498 | ./run-transducer.sh | 437 | ./run-transducer.sh |
| 499 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 | 438 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 |
| 500 | 439 | ||
| 501 | echo "Test paraformer" | 440 | echo "Test paraformer" |
| 502 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 503 | ./run-paraformer.sh | 441 | ./run-paraformer.sh |
| 504 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en | 442 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en |
| 505 | 443 |
| @@ -59,6 +59,12 @@ jobs: | @@ -59,6 +59,12 @@ jobs: | ||
| 59 | go version | 59 | go version |
| 60 | go env GOPATH | 60 | go env GOPATH |
| 61 | go env GOARCH | 61 | go env GOARCH |
| 62 | + go env CGO_ENABLED | ||
| 63 | + | ||
| 64 | + - name: Display go env | ||
| 65 | + shell: bash | ||
| 66 | + run: | | ||
| 67 | + go env | ||
| 62 | 68 | ||
| 63 | - name: Build sherpa-onnx | 69 | - name: Build sherpa-onnx |
| 64 | shell: bash | 70 | shell: bash |
| @@ -71,19 +77,24 @@ jobs: | @@ -71,19 +77,24 @@ jobs: | ||
| 71 | cp -v _deps/onnxruntime-src/lib/libonnxruntime*dylib ./lib/ | 77 | cp -v _deps/onnxruntime-src/lib/libonnxruntime*dylib ./lib/ |
| 72 | 78 | ||
| 73 | cd ../scripts/go/_internal/ | 79 | cd ../scripts/go/_internal/ |
| 80 | + ls -lh lib | ||
| 81 | + echo "-----" | ||
| 82 | + ls -lh lib/*/ | ||
| 83 | + echo "-----" | ||
| 84 | + | ||
| 74 | go mod tidy | 85 | go mod tidy |
| 75 | go build | 86 | go build |
| 76 | 87 | ||
| 77 | - - name: Test streaming HLG decoding | 88 | + - name: Test speaker identification |
| 78 | shell: bash | 89 | shell: bash |
| 79 | run: | | 90 | run: | |
| 80 | - cd scripts/go/_internal/streaming-hlg-decoding/ | 91 | + cd scripts/go/_internal/speaker-identification/ |
| 81 | ./run.sh | 92 | ./run.sh |
| 82 | 93 | ||
| 83 | - - name: Test speaker identification | 94 | + - name: Test streaming HLG decoding |
| 84 | shell: bash | 95 | shell: bash |
| 85 | run: | | 96 | run: | |
| 86 | - cd scripts/go/_internal/speaker-identification/ | 97 | + cd scripts/go/_internal/streaming-hlg-decoding/ |
| 87 | ./run.sh | 98 | ./run.sh |
| 88 | 99 | ||
| 89 | - name: Test non-streaming TTS (macOS) | 100 | - name: Test non-streaming TTS (macOS) |
| @@ -101,24 +112,18 @@ jobs: | @@ -101,24 +112,18 @@ jobs: | ||
| 101 | git lfs install | 112 | git lfs install |
| 102 | 113 | ||
| 103 | echo "Test vits-ljs" | 114 | echo "Test vits-ljs" |
| 104 | - git clone https://huggingface.co/csukuangfj/vits-ljs | ||
| 105 | ./run-vits-ljs.sh | 115 | ./run-vits-ljs.sh |
| 106 | rm -rf vits-ljs | 116 | rm -rf vits-ljs |
| 107 | 117 | ||
| 108 | echo "Test vits-vctk" | 118 | echo "Test vits-vctk" |
| 109 | - git clone https://huggingface.co/csukuangfj/vits-vctk | ||
| 110 | ./run-vits-vctk.sh | 119 | ./run-vits-vctk.sh |
| 111 | rm -rf vits-vctk | 120 | rm -rf vits-vctk |
| 112 | 121 | ||
| 113 | echo "Test vits-zh-aishell3" | 122 | echo "Test vits-zh-aishell3" |
| 114 | - curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2 | ||
| 115 | - tar xvf vits-icefall-zh-aishell3.tar.bz2 | ||
| 116 | - rm vits-icefall-zh-aishell3.tar.bz2 | ||
| 117 | ./run-vits-zh-aishell3.sh | 123 | ./run-vits-zh-aishell3.sh |
| 118 | rm -rf vits-icefall-zh-aishell3 | 124 | rm -rf vits-icefall-zh-aishell3 |
| 119 | 125 | ||
| 120 | echo "Test vits-piper-en_US-lessac-medium" | 126 | echo "Test vits-piper-en_US-lessac-medium" |
| 121 | - git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium | ||
| 122 | ./run-vits-piper-en_US-lessac-medium.sh | 127 | ./run-vits-piper-en_US-lessac-medium.sh |
| 123 | rm -rf vits-piper-en_US-lessac-medium | 128 | rm -rf vits-piper-en_US-lessac-medium |
| 124 | 129 | ||
| @@ -142,30 +147,22 @@ jobs: | @@ -142,30 +147,22 @@ jobs: | ||
| 142 | git lfs install | 147 | git lfs install |
| 143 | 148 | ||
| 144 | echo "Test transducer" | 149 | echo "Test transducer" |
| 145 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26 | ||
| 146 | ./run-transducer.sh | 150 | ./run-transducer.sh |
| 147 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 | 151 | rm -rf sherpa-onnx-zipformer-en-2023-06-26 |
| 148 | 152 | ||
| 149 | echo "Test paraformer" | 153 | echo "Test paraformer" |
| 150 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28 | ||
| 151 | ./run-paraformer.sh | 154 | ./run-paraformer.sh |
| 152 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 | 155 | rm -rf sherpa-onnx-paraformer-zh-2023-03-28 |
| 153 | 156 | ||
| 154 | echo "Test NeMo CTC" | 157 | echo "Test NeMo CTC" |
| 155 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium | ||
| 156 | ./run-nemo-ctc.sh | 158 | ./run-nemo-ctc.sh |
| 157 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium | 159 | rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium |
| 158 | 160 | ||
| 159 | echo "Test Whisper tiny.en" | 161 | echo "Test Whisper tiny.en" |
| 160 | - GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en | ||
| 161 | - cd sherpa-onnx-whisper-tiny.en | ||
| 162 | - git lfs pull --include "*.onnx" | ||
| 163 | - cd .. | ||
| 164 | ./run-whisper.sh | 162 | ./run-whisper.sh |
| 165 | rm -rf sherpa-onnx-whisper-tiny.en | 163 | rm -rf sherpa-onnx-whisper-tiny.en |
| 166 | 164 | ||
| 167 | echo "Test Tdnn yesno" | 165 | echo "Test Tdnn yesno" |
| 168 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno | ||
| 169 | ./run-tdnn-yesno.sh | 166 | ./run-tdnn-yesno.sh |
| 170 | rm -rf sherpa-onnx-tdnn-yesno | 167 | rm -rf sherpa-onnx-tdnn-yesno |
| 171 | 168 | ||
| @@ -179,22 +176,14 @@ jobs: | @@ -179,22 +176,14 @@ jobs: | ||
| 179 | go build | 176 | go build |
| 180 | ls -lh | 177 | ls -lh |
| 181 | 178 | ||
| 182 | - git lfs install | ||
| 183 | - | ||
| 184 | echo "Test zipformer2 CTC" | 179 | echo "Test zipformer2 CTC" |
| 185 | - wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 186 | - tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 187 | - rm sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 188 | - | ||
| 189 | ./run-zipformer2-ctc.sh | 180 | ./run-zipformer2-ctc.sh |
| 190 | rm -rf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13 | 181 | rm -rf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13 |
| 191 | 182 | ||
| 192 | echo "Test transducer" | 183 | echo "Test transducer" |
| 193 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26 | ||
| 194 | ./run-transducer.sh | 184 | ./run-transducer.sh |
| 195 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 | 185 | rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 |
| 196 | 186 | ||
| 197 | echo "Test paraformer" | 187 | echo "Test paraformer" |
| 198 | - git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 199 | ./run-paraformer.sh | 188 | ./run-paraformer.sh |
| 200 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en | 189 | rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en |
| @@ -31,6 +31,7 @@ func main() { | @@ -31,6 +31,7 @@ func main() { | ||
| 31 | flag.StringVar(&config.ModelConfig.Whisper.Decoder, "whisper-decoder", "", "Path to the whisper decoder model") | 31 | flag.StringVar(&config.ModelConfig.Whisper.Decoder, "whisper-decoder", "", "Path to the whisper decoder model") |
| 32 | flag.StringVar(&config.ModelConfig.Whisper.Language, "whisper-language", "", "Language of the input wave. You can leave it empty ") | 32 | flag.StringVar(&config.ModelConfig.Whisper.Language, "whisper-language", "", "Language of the input wave. You can leave it empty ") |
| 33 | flag.StringVar(&config.ModelConfig.Whisper.Task, "whisper-task", "transcribe", "transcribe or translate") | 33 | flag.StringVar(&config.ModelConfig.Whisper.Task, "whisper-task", "transcribe", "transcribe or translate") |
| 34 | + flag.IntVar(&config.ModelConfig.Whisper.TailPaddings, "whisper-tail-paddings", -1, "tail paddings for whisper") | ||
| 34 | 35 | ||
| 35 | flag.StringVar(&config.ModelConfig.Tdnn.Model, "tdnn-model", "", "Path to the tdnn model") | 36 | flag.StringVar(&config.ModelConfig.Tdnn.Model, "tdnn-model", "", "Path to the tdnn model") |
| 36 | 37 |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/nemo/english.html#stt-en-conformer-ctc-medium | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to a different offline model if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-nemo-ctc-en-conformer-medium ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2 | ||
| 8 | + rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./non-streaming-decode-files \ | 14 | ./non-streaming-decode-files \ |
| 11 | --nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \ | 15 | --nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-03-28-chinese | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-paraformer-zh-2023-03-28 ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2 | ||
| 8 | + rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 8 | 13 | ||
| 9 | ./non-streaming-decode-files \ | 14 | ./non-streaming-decode-files \ |
| 10 | --paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \ | 15 | --paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/yesno/index.html | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-tdnn-yesno ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-tdnn-yesno.tar.bz2 | ||
| 8 | + rm sherpa-onnx-tdnn-yesno.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 8 | 13 | ||
| 9 | ./non-streaming-decode-files \ | 14 | ./non-streaming-decode-files \ |
| 10 | --sample-rate=8000 \ | 15 | --sample-rate=8000 \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-zipformer-en-2023-06-26-english | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to a different offline model if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-streaming-zipformer-en-2023-06-26 ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-06-26.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-zipformer-en-2023-06-26.tar.bz2 | ||
| 8 | + rm sherpa-onnx-zipformer-en-2023-06-26.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./non-streaming-decode-files \ | 14 | ./non-streaming-decode-files \ |
| 11 | --encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \ | 15 | --encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/whisper/tiny.en.html | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to a different offline model if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-whisper-tiny.en ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2 | ||
| 8 | + rm sherpa-onnx-whisper-tiny.en.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./non-streaming-decode-files \ | 14 | ./non-streaming-decode-files \ |
| 11 | --whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \ | 15 | --whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#ljspeech-english-single-speaker | ||
| 5 | -# to download the model before you run this script | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d vits-ljs ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-ljs.tar.bz2 | ||
| 7 | + tar xvf vits-ljs.tar.bz2 | ||
| 8 | + rm vits-ljs.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 6 | 13 | ||
| 7 | ./non-streaming-tts \ | 14 | ./non-streaming-tts \ |
| 8 | --vits-model=./vits-ljs/vits-ljs.onnx \ | 15 | --vits-model=./vits-ljs/vits-ljs.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#en-us-lessac-medium-english-single-speaker | ||
| 5 | -# to download the model before you run this script | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d vits-piper-en_US-lessac-medium ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-lessac-medium.tar.bz2 | ||
| 7 | + tar xvf vits-piper-en_US-lessac-medium.tar.bz2 | ||
| 8 | + rm vits-piper-en_US-lessac-medium.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 6 | 13 | ||
| 7 | ./non-streaming-tts \ | 14 | ./non-streaming-tts \ |
| 8 | --vits-model=./vits-piper-en_US-lessac-medium/en_US-lessac-medium.onnx \ | 15 | --vits-model=./vits-piper-en_US-lessac-medium/en_US-lessac-medium.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#vctk-english-multi-speaker-109-speakers | ||
| 5 | -# to download the model before you run this script | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d vits-vctk ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-vctk.tar.bz2 | ||
| 7 | + tar xvf vits-vctk.tar.bz2 | ||
| 8 | + rm vits-vctk.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 6 | 13 | ||
| 7 | for sid in 0 10 108; do | 14 | for sid in 0 10 108; do |
| 8 | ./non-streaming-tts \ | 15 | ./non-streaming-tts \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | +set -ex | ||
| 2 | 3 | ||
| 3 | -# please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#aishell3-chinese-multi-speaker-174-speakers | ||
| 5 | -# to download the model before you run this script | 4 | +if [ ! -d vits-icefall-zh-aishell3 ]; then |
| 5 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2 | ||
| 6 | + tar xvf vits-icefall-zh-aishell3.tar.bz2 | ||
| 7 | + rm vits-icefall-zh-aishell3.tar.bz2 | ||
| 8 | +fi | ||
| 9 | + | ||
| 10 | +go mod tidy | ||
| 11 | +go build | ||
| 6 | 12 | ||
| 7 | for sid in 10 33 99; do | 13 | for sid in 10 33 99; do |
| 8 | ./non-streaming-tts \ | 14 | ./non-streaming-tts \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#pkufool-icefall-asr-zipformer-streaming-wenetspeech-20230615-chinese | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to different online models if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d icefall-asr-zipformer-streaming-wenetspeech-20230615 ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2 | ||
| 7 | + tar xvf icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2 | ||
| 8 | + rm icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./real-time-speech-recognition-from-microphone \ | 14 | ./real-time-speech-recognition-from-microphone \ |
| 11 | --encoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/encoder-epoch-12-avg-4-chunk-16-left-128.onnx \ | 15 | --encoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/encoder-epoch-12-avg-4-chunk-16-left-128.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 4 | + | ||
| 3 | if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then | 5 | if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then |
| 4 | curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx | 6 | curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx |
| 5 | fi | 7 | fi |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-streaming-paraformer-bilingual-zh-en-chinese-english | ||
| 5 | -# to download the model files | 3 | +set -ex |
| 6 | 4 | ||
| 7 | if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then | 5 | if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then |
| 8 | - GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 9 | - cd sherpa-onnx-streaming-paraformer-bilingual-zh-en | ||
| 10 | - git lfs pull --include "*.onnx" | ||
| 11 | - cd .. | 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2 |
| 7 | + tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2 | ||
| 8 | + rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2 | ||
| 12 | fi | 9 | fi |
| 13 | 10 | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 13 | + | ||
| 14 | ./streaming-decode-files \ | 14 | ./streaming-decode-files \ |
| 15 | --paraformer-encoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/encoder.int8.onnx \ | 15 | --paraformer-encoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/encoder.int8.onnx \ |
| 16 | --paraformer-decoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/decoder.int8.onnx \ | 16 | --paraformer-decoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/decoder.int8.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-streaming-zipformer-en-2023-06-26-english | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to a different online model if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-streaming-zipformer-en-2023-06-26 ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2 | ||
| 8 | + rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./streaming-decode-files \ | 14 | ./streaming-decode-files \ |
| 11 | --encoder ./sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.onnx \ | 15 | --encoder ./sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | -# Please refer to | ||
| 4 | -# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-ctc/zipformer-ctc-models.html#sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13-chinese | ||
| 5 | -# to download the model | ||
| 6 | -# before you run this script. | ||
| 7 | -# | ||
| 8 | -# You can switch to a different online model if you need | 3 | +set -ex |
| 4 | + | ||
| 5 | +if [ ! -d sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13 ]; then | ||
| 6 | + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 7 | + tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 8 | + rm sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2 | ||
| 9 | +fi | ||
| 10 | + | ||
| 11 | +go mod tidy | ||
| 12 | +go build | ||
| 9 | 13 | ||
| 10 | ./streaming-decode-files \ | 14 | ./streaming-decode-files \ |
| 11 | --zipformer2-ctc ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/ctc-epoch-20-avg-1-chunk-16-left-128.onnx \ | 15 | --zipformer2-ctc ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/ctc-epoch-20-avg-1-chunk-16-left-128.onnx \ |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 3 | 4 | ||
| 4 | if [ ! -f ./silero_vad.onnx ]; then | 5 | if [ ! -f ./silero_vad.onnx ]; then |
| 5 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx | 6 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 3 | 4 | ||
| 4 | if [ ! -f ./silero_vad.onnx ]; then | 5 | if [ ! -f ./silero_vad.onnx ]; then |
| 5 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx | 6 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 4 | + | ||
| 3 | if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then | 5 | if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then |
| 4 | curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx | 6 | curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx |
| 5 | fi | 7 | fi |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 3 | 4 | ||
| 4 | if [ ! -f ./silero_vad.onnx ]; then | 5 | if [ ! -f ./silero_vad.onnx ]; then |
| 5 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx | 6 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx |
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | +set -ex | ||
| 3 | 4 | ||
| 4 | if [ ! -f ./silero_vad.onnx ]; then | 5 | if [ ! -f ./silero_vad.onnx ]; then |
| 5 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx | 6 | curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx |
scripts/go/_internal/build_darwin_arm64.go
0 → 100644
| 1 | +//go:build darwin && arm64 && !ios | ||
| 2 | + | ||
| 3 | +package sherpa_onnx | ||
| 4 | + | ||
| 5 | +// #cgo LDFLAGS: -L ${SRCDIR}/lib/aarch64-apple-darwin -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-native-fbank-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fstfar -lsherpa-onnx-fst -lpiper_phonemize -lespeak-ng -lucd -lonnxruntime -Wl,-rpath,${SRCDIR}/lib/aarch64-apple-darwin | ||
| 6 | +import "C" |
| 1 | +../../../../build/lib |
| @@ -3,9 +3,3 @@ module non-streaming-decode-files | @@ -3,9 +3,3 @@ module non-streaming-decode-files | ||
| 3 | go 1.12 | 3 | go 1.12 |
| 4 | 4 | ||
| 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ | 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ |
| 6 | - | ||
| 7 | -require ( | ||
| 8 | - github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000 | ||
| 9 | - github.com/spf13/pflag v1.0.5 | ||
| 10 | - github.com/youpy/go-wav v0.3.2 | ||
| 11 | -) |
| @@ -3,9 +3,3 @@ module real-time-speech-recognition-from-microphone | @@ -3,9 +3,3 @@ module real-time-speech-recognition-from-microphone | ||
| 3 | go 1.12 | 3 | go 1.12 |
| 4 | 4 | ||
| 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ | 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ |
| 6 | - | ||
| 7 | -require ( | ||
| 8 | - github.com/gordonklaus/portaudio v0.0.0-20230709114228-aafa478834f5 | ||
| 9 | - github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000 | ||
| 10 | - github.com/spf13/pflag v1.0.5 | ||
| 11 | -) |
| @@ -3,9 +3,3 @@ module streaming-decode-files | @@ -3,9 +3,3 @@ module streaming-decode-files | ||
| 3 | go 1.12 | 3 | go 1.12 |
| 4 | 4 | ||
| 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ | 5 | replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../ |
| 6 | - | ||
| 7 | -require ( | ||
| 8 | - github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000 | ||
| 9 | - github.com/spf13/pflag v1.0.5 | ||
| 10 | - github.com/youpy/go-wav v0.3.2 | ||
| 11 | -) |
-
请 注册 或 登录 后发表评论