diff --git a/.github/workflows/export-revai-segmentation-to-onnx.yaml b/.github/workflows/export-revai-segmentation-to-onnx.yaml index d82f7c4e0..3db043bd0 100644 --- a/.github/workflows/export-revai-segmentation-to-onnx.yaml +++ b/.github/workflows/export-revai-segmentation-to-onnx.yaml @@ -17,6 +17,7 @@ jobs: matrix: os: [macos-latest] python-version: ["3.10"] + model_version: [v1,, v2] steps: - uses: actions/checkout@v4 @@ -34,7 +35,9 @@ jobs: - name: Run shell: bash run: | - d=sherpa-onnx-reverb-diarization-v1 + v=${{ matrix.model_version }} + export VERSION=$v + d=sherpa-onnx-reverb-diarization-$v src=$PWD/$d mkdir -p $src @@ -72,7 +75,10 @@ jobs: git config --global user.email "csukuangfj@gmail.com" git config --global user.name "Fangjun Kuang" - d=sherpa-onnx-reverb-diarization-v1 + v=${{ matrix.model_version }} + export VERSION=$v + + d=sherpa-onnx-reverb-diarization-$v export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d huggingface diff --git a/scripts/pyannote/segmentation/run-revai.sh b/scripts/pyannote/segmentation/run-revai.sh index 61f4fec29..a7f924a4e 100755 --- a/scripts/pyannote/segmentation/run-revai.sh +++ b/scripts/pyannote/segmentation/run-revai.sh @@ -3,13 +3,17 @@ export SHERPA_ONNX_IS_REVAI=1 +if [ -z $VERSION ]; then + VERSION=v1 +fi + set -ex function install_pyannote() { pip install pyannote.audio onnx onnxruntime } function download_test_files() { - curl -SL -O https://huggingface.co/Revai/reverb-diarization-v1/resolve/main/pytorch_model.bin + curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/pytorch_model.bin curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav } @@ -28,13 +32,13 @@ echo "----------onnx model.onnx----------" echo "----------onnx model.int8.onnx----------" ./vad-onnx.py --model ./model.int8.onnx --wav ./lei-jun-test.wav -curl -SL -O https://huggingface.co/Revai/reverb-diarization-v1/resolve/main/LICENSE +curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/LICENSE cat >README.md << EOF # Introduction Models in this file are converted from -https://huggingface.co/Revai/reverb-diarization-v1/tree/main +https://huggingface.co/Revai/reverb-diarization-$VERSION/tree/main Note that it is accessible under a non-commercial license.