Release v1.12.37 (#3496) #1948
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-go | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - go | |
| paths: | |
| - '.github/workflows/test-go.yaml' | |
| - 'cmake/**' | |
| - 'sherpa-onnx/csrc/*' | |
| - 'go-api-examples/**' | |
| - 'scripts/go/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: test-go-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-go: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, macos-15-intel, ubuntu-latest, windows-2022, ubuntu-22.04-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update version | |
| shell: bash | |
| run: | | |
| ./new-release.sh | |
| git diff . | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.os }}-go | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '>=1.17' | |
| - name: Display go version | |
| shell: bash | |
| run: | | |
| go version | |
| go env GOPATH | |
| go env GOARCH | |
| go env CGO_ENABLED | |
| - name: Display go env | |
| shell: bash | |
| run: | | |
| go env | |
| - name: Build sherpa-onnx | |
| shell: bash | |
| run: | | |
| upload_dir=$PWD/to-upload | |
| mkdir -p $upload_dir | |
| echo "upload_dir" | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| mkdir build | |
| cd build | |
| cmake \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DBUILD_SHARED_LIBS=ON \ | |
| -DSHERPA_ONNX_ENABLE_PORTAUDIO=OFF \ | |
| -DSHERPA_ONNX_ENABLE_WEBSOCKET=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=./install \ | |
| .. | |
| if [[ ${{ matrix.os }} == windows-2022 ]]; then | |
| cmake --build . --target install --config Release -- -m:2 | |
| else | |
| make -j2 install | |
| fi | |
| if [[ ${{ matrix.os }} == ubuntu-latest || ${{ matrix.os }} == ubuntu-22.04-arm ]]; then | |
| cp -v ./lib/*.so $upload_dir | |
| cp -v _deps/onnxruntime-src/lib/libonnxruntime*so* $upload_dir | |
| cp -v _deps/onnxruntime-src/lib/libonnxruntime*so* ./lib/ | |
| rm -v ./lib/*.a | |
| ls -h ./lib | |
| elif [[ ${{ matrix.os }} == windows-2022 ]]; then | |
| cp -v ./install/lib/sherpa-onnx-c-api.dll ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/ | |
| cp -v ./install/lib/onnxruntime.dll ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/ | |
| ls -lh ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/add-punctuation | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/add-punctuation-online | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/audio-tagging | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/keyword-spotting-from-file/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-canary-decode-files/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-cohere-transcribe-decode-files/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-decode-files/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-fire-red-asr-ctc-decode-files | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-funasr-nano-decode-files | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-medasr-ctc-decode-files | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-moonshine-v2-decode-files | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-omnilingual-asr-ctc-decode-files | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-speaker-diarization/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/non-streaming-tts/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/speaker-identification/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/speech-enhancement-gtcrn | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/speech-enhancement-dpdfnet | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/streaming-decode-files/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/streaming-speech-enhancement-gtcrn | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/streaming-speech-enhancement-dpdfnet | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/streaming-hlg-decoding/ | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/vad | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/vad-asr-paraformer | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/vad-asr-whisper | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/vad-speaker-identification | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/vad-spoken-language-identification | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/zero-shot-pocket-tts | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/source-separation | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll ../scripts/go/_internal/supertonic-tts | |
| cp -v ../scripts/go/_internal/lib/x86_64-pc-windows-gnu/*.dll $upload_dir | |
| else | |
| cp -v _deps/onnxruntime-src/lib/libonnxruntime*dylib $upload_dir/ | |
| cp -v lib/*.dylib $upload_dir | |
| cp -v _deps/onnxruntime-src/lib/libonnxruntime*dylib ./lib/ | |
| rm ./lib/*.a | |
| rm ./lib/libonnxruntime.dylib | |
| cd lib | |
| ln -s libonnxruntime.1.23.2.dylib libonnxruntime.dylib | |
| cd .. | |
| fi | |
| cd ../scripts/go/_internal/ | |
| ls -lh lib | |
| echo "-----" | |
| ls -lh lib/*/ | |
| echo "-----" | |
| go mod tidy | |
| go build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }}-libs | |
| path: to-upload/ | |
| - name: Test source separation (Spleeter & UVR) | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/source-separation | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run-spleeter.sh | |
| rm -rf sherpa-onnx-spleeter-* | |
| ./run-uvr.sh | |
| rm -rf UVR-MDX-NET-* | |
| - name: Test non-streaming decoding files with Cohere Transcribe | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-cohere-transcribe-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-cohere-transcribe-* | |
| - name: Test non-streaming decoding files with Qwen3 ASR | |
| if: matrix.os != 'ubuntu-latest' | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-qwen3-asr-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-qwen3-* | |
| - name: Test SupertonicTTS | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/supertonic-tts | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-* | |
| ls -lh *.wav | |
| - name: Test non-streaming decoding files with Moonshine v2 | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-moonshine-v2-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-moonshine-* | |
| - name: Test non-streaming decoding files with FireRedAsrCtc | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-fire-red-asr-ctc-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-fire-red-* | |
| - name: Test ZeroShot TTS with PocketTTS | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/zero-shot-pocket-tts | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-* | |
| ls -lh *.wav | |
| - name: Test ZeroShot TTS with ZipVoice | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/zero-shot-zipvoice-tts | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-zipvoice-distill-int8-zh-en-emilia | |
| rm -f vocos_24khz.onnx | |
| ls -lh *.wav | |
| - name: Test non-streaming decoding files with FunASR Nano | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-funasr-nano-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-funasr-* | |
| - name: Test non-streaming decoding files with MedASR | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-medasr-ctc-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-medasr-* | |
| - name: Test non-streaming decoding files with Omnilingual ASR | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-omnilingual-asr-ctc-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-omnilingual-* | |
| - name: Test non-streaming TTS | |
| shell: bash | |
| run: | | |
| mkdir tts-waves | |
| cd scripts/go/_internal/non-streaming-tts/ | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| echo "Test kitten en" | |
| ./run-kitten-en.sh | |
| rm -rf kitten-* | |
| ls -lh | |
| echo "Test kokoro zh+en" | |
| ./run-kokoro-zh-en.sh | |
| rm -rf kokoro-multi-* | |
| ls -lh | |
| echo "Test kokoro en" | |
| ./run-kokoro-en.sh | |
| rm -rf kokoro-en-* | |
| ls -lh | |
| echo "Test matcha zh" | |
| ./run-matcha-zh.sh | |
| rm -rf matcha-icefall-* | |
| echo "Test matcha en" | |
| ./run-matcha-en.sh | |
| rm -rf matcha-icefall-* | |
| ls -lh *.wav | |
| echo "Test vits-ljs" | |
| ./run-vits-ljs.sh | |
| rm -rf vits-ljs | |
| echo "Test vits-vctk" | |
| ./run-vits-vctk.sh | |
| rm -rf vits-vctk | |
| echo "Test vits-zh-aishell3" | |
| ./run-vits-zh-aishell3.sh | |
| rm -rf vits-icefall-zh-aishell3 | |
| echo "Test vits-piper-en_US-lessac-medium" | |
| ./run-vits-piper-en_US-lessac-medium.sh | |
| rm -rf vits-piper-en_US-lessac-medium | |
| cp *.wav ../../../../tts-waves/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: tts-waves-${{ matrix.os }} | |
| path: tts-waves | |
| - name: Test streaming decoding files | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/streaming-decode-files | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| echo "Test T-one CTC" | |
| ./run-t-one-ctc.sh | |
| echo "Test zipformer2 CTC" | |
| ./run-zipformer2-ctc-with-hr.sh | |
| ./run-zipformer2-ctc.sh | |
| rm -rf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13 | |
| echo "Test transducer" | |
| ./run-transducer.sh | |
| rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26 | |
| ./run-transducer-itn.sh | |
| rm -rf sherpa-onnx-streaming-* | |
| echo "Test paraformer" | |
| ./run-paraformer.sh | |
| rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en | |
| - name: Test non-streaming decoding files with NeMo Canary | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-canary-decode-files/ | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| ./run.sh | |
| rm -rf sherpa-onnx-nemo-* | |
| - name: Test non-streaming decoding files | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-decode-files/ | |
| ls -lh | |
| go mod tidy | |
| cat go.mod | |
| go build | |
| ls -lh | |
| echo "Test Wenet CTC" | |
| ./run-wenet-ctc.sh | |
| rm -rf sherpa-onnx-wenet* | |
| echo "Test Zipformer CTC" | |
| ./run-zipformer-ctc.sh | |
| rm -rf sherpa-onnx-zipformer-* | |
| echo "Test SenseVoice ctc" | |
| ./run-sense-voice-small-with-hr.sh | |
| ./run-sense-voice-small.sh | |
| rm -rf sherpa-onnx-sense-* | |
| echo "Test Dolphin CTC" | |
| ./run-dolphin-ctc-base.sh | |
| rm -rf sherpa-onnx-dolphin-* | |
| echo "Test FireRedAsr" | |
| ./run-fire-red-asr.sh | |
| rm -rf sherpa-onnx-fire-red-asr-* | |
| echo "Test Moonshine" | |
| ./run-moonshine.sh | |
| rm -rf sherpa-onnx-* | |
| echo "Test telespeech ctc" | |
| ./run-telespeech-ctc.sh | |
| rm -rf sherpa-onnx-telespeech-ctc-* | |
| echo "Test transducer" | |
| ./run-transducer.sh | |
| rm -rf sherpa-onnx-zipformer-en-2023-06-26 | |
| echo "Test transducer" | |
| ./run-transducer.sh | |
| rm -rf sherpa-onnx-zipformer-en-2023-06-26 | |
| echo "Test paraformer" | |
| ./run-paraformer.sh | |
| ./run-paraformer-itn.sh | |
| rm -rf sherpa-onnx-paraformer-zh-2023-09-14 | |
| echo "Test NeMo CTC" | |
| ./run-nemo-ctc.sh | |
| rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium | |
| echo "Test Whisper tiny.en" | |
| ./run-whisper.sh | |
| rm -rf sherpa-onnx-whisper-tiny.en | |
| echo "Test Tdnn yesno" | |
| ./run-tdnn-yesno.sh | |
| rm -rf sherpa-onnx-tdnn-yesno | |
| - name: Test speech enhancement (GTCRN) | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/speech-enhancement-gtcrn/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test speech enhancement (DPDFNet) | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/speech-enhancement-dpdfnet/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test streaming speech enhancement (GTCRN) | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/streaming-speech-enhancement-gtcrn/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test streaming speech enhancement (DPDFNet) | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/streaming-speech-enhancement-dpdfnet/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test audio tagging | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/audio-tagging/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test Keyword spotting | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/keyword-spotting-from-file/ | |
| ./run.sh | |
| ls -lh | |
| - name: Test adding punctuation | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/add-punctuation/ | |
| ./run.sh | |
| - name: Test adding online punctuation | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/add-punctuation-online/ | |
| ./run.sh | |
| - name: Test non-streaming speaker diarization | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/non-streaming-speaker-diarization/ | |
| ./run.sh | |
| - name: Test speaker identification | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/speaker-identification/ | |
| ./run.sh | |
| - name: Test streaming HLG decoding | |
| shell: bash | |
| run: | | |
| cd scripts/go/_internal/streaming-hlg-decoding/ | |
| ./run.sh |