Add support for the new NeMo Canary ASR model across multiple language bindings by introducing a Canary model configuration and setter method on the offline recognizer. - Define Canary model config in Pascal, Go, C#, Dart and update converter functions - Add SetConfig API for offline recognizer (Pascal, Go, C#, Dart) - Extend CI/workflows and example scripts to test non-streaming Canary decoding
364 lines
8.8 KiB
YAML
364 lines
8.8 KiB
YAML
name: pascal
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/pascal.yaml'
|
|
- 'cmake/**'
|
|
- 'pascal-api-examples/**'
|
|
- 'sherpa-onnx/csrc/*'
|
|
- 'sherpa-onnx/c-api/*'
|
|
- 'sherpa-onnx/pascal-api/*'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/pascal.yaml'
|
|
- '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, 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 }}
|
|
|
|
- name: Install Free pascal compiler (ubuntu)
|
|
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-22.04-arm'
|
|
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/non-streaming-asr
|
|
cp -v install/lib/*.dll ../pascal-api-examples/read-wav
|
|
cp -v install/lib/*.dll ../pascal-api-examples/speaker-diarization
|
|
cp -v install/lib/*.dll ../pascal-api-examples/speech-enhancement-gtcrn
|
|
cp -v install/lib/*.dll ../pascal-api-examples/streaming-asr
|
|
cp -v install/lib/*.dll ../pascal-api-examples/tts
|
|
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/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/speaker-diarization
|
|
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/speech-enhancement-gtcrn
|
|
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/streaming-asr
|
|
cp -v ../sherpa-onnx/pascal-api/*.pas ../pascal-api-examples/tts
|
|
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
|
|
fi
|
|
|
|
- name: Run Speech Enhancement test (GTCRN)
|
|
shell: bash
|
|
run: |
|
|
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
|
|
|
|
cd ./pascal-api-examples
|
|
|
|
pushd speech-enhancement-gtcrn
|
|
./run-gtcrn.sh
|
|
ls -lh
|
|
|
|
- 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-nemo-canary.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
./run-zipformer-ctc.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
./run-dolphin-ctc.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
./run-zipformer-transducer.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
./run-moonshine.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
./run-fire-red-asr.sh
|
|
rm -rf sherpa-onnx-fire-red-asr*
|
|
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 (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-*
|
|
rm piper
|
|
ls -lh
|
|
echo "---"
|
|
|
|
./run-kokoro-zh-en.sh
|
|
rm -rf kokoro-multi-*
|
|
rm kokoro-zh-en
|
|
ls -lh
|
|
echo "---"
|
|
|
|
./run-kokoro-en.sh
|
|
rm -rf kokoro-en-*
|
|
rm kokoro-en
|
|
ls -lh
|
|
echo "---"
|
|
|
|
./run-matcha-zh.sh
|
|
rm -rf matcha-icefall-*
|
|
rm matcha-zh
|
|
ls -lh
|
|
echo "---"
|
|
|
|
./run-matcha-en.sh
|
|
rm -rf matcha-icefall-*
|
|
rm matcha-en
|
|
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-zipformer-ctc.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
time ./run-vad-with-dolphin-ctc.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
time ./run-vad-with-moonshine.sh
|
|
rm -rf sherpa-onnx-*
|
|
echo "---"
|
|
|
|
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 (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
|