Support Giga AM transducer V2 (#2136)

This commit is contained in:
Fangjun Kuang
2025-04-20 10:15:20 +08:00
committed by GitHub
parent 01110cc22b
commit be0f382a54
14 changed files with 355 additions and 25 deletions

View File

@@ -43,7 +43,8 @@ jobs:
mv -v scripts/nemo/GigaAM/tokens.txt $d/
mv -v scripts/nemo/GigaAM/*.wav $d/test_wavs/
mv -v scripts/nemo/GigaAM/run-ctc.sh $d/
mv -v scripts/nemo/GigaAM/*-ctc.py $d/
mv -v scripts/nemo/GigaAM/export-onnx-ctc.py $d/
cp -v scripts/nemo/GigaAM/test-onnx-ctc.py $d/
ls -lh scripts/nemo/GigaAM/
@@ -71,7 +72,8 @@ jobs:
mv -v scripts/nemo/GigaAM/tokens.txt $d/
mv -v scripts/nemo/GigaAM/*.wav $d/test_wavs/
mv -v scripts/nemo/GigaAM/run-rnnt.sh $d/
mv -v scripts/nemo/GigaAM/*-rnnt.py $d/
mv -v scripts/nemo/GigaAM/export-onnx-rnnt.py $d/
cp -v scripts/nemo/GigaAM/test-onnx-rnnt.py $d/
ls -lh scripts/nemo/GigaAM/
@@ -91,11 +93,12 @@ jobs:
mkdir $d/test_wavs
rm scripts/nemo/GigaAM/v2_ctc.onnx
mv -v scripts/nemo/GigaAM/*.int8.onnx $d/
cp -v scripts/nemo/GigaAM/LICENCE $d/
cp -v scripts/nemo/GigaAM/LICENSE $d/
mv -v scripts/nemo/GigaAM/tokens.txt $d/
mv -v scripts/nemo/GigaAM/*.wav $d/test_wavs/
mv -v scripts/nemo/GigaAM/run-ctc.sh $d/
mv -v scripts/nemo/GigaAM/run-ctc-v2.sh $d/
mv -v scripts/nemo/GigaAM/*-ctc-v2.py $d/
cp -v scripts/nemo/GigaAM/test-onnx-ctc.py $d/
ls -lh scripts/nemo/GigaAM/
@@ -103,8 +106,36 @@ jobs:
tar cjvf ${d}.tar.bz2 $d
- name: Run Transducer v2
shell: bash
run: |
pushd scripts/nemo/GigaAM
./run-rnnt-v2.sh
popd
d=sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19
mkdir $d
mkdir $d/test_wavs
mv -v scripts/nemo/GigaAM/encoder.int8.onnx $d/
mv -v scripts/nemo/GigaAM/decoder.onnx $d/
mv -v scripts/nemo/GigaAM/joiner.onnx $d/
cp -v scripts/nemo/GigaAM/*.md $d/
cp -v scripts/nemo/GigaAM/LICENSE $d/
mv -v scripts/nemo/GigaAM/tokens.txt $d/
mv -v scripts/nemo/GigaAM/*.wav $d/test_wavs/
mv -v scripts/nemo/GigaAM/run-rnnt-v2.sh $d/
cp -v scripts/nemo/GigaAM/test-onnx-rnnt.py $d/
ls -lh scripts/nemo/GigaAM/
ls -lh $d
tar cjvf ${d}.tar.bz2 $d
- name: Release
if: github.repository_owner == 'csukuangfj'
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
@@ -114,7 +145,16 @@ jobs:
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
tag: asr-models
- name: Publish to huggingface (Transducer)
- name: Release
if: github.repository_owner == 'k2-fsa'
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
file: ./*.tar.bz2
overwrite: true
tag: asr-models
- name: Publish to huggingface (CTC)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
@@ -126,11 +166,66 @@ jobs:
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
d=sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24/
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
rm -rf huggingface
git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d huggingface
cp -av $d/* ./huggingface
cd huggingface
git lfs track "*.onnx"
git lfs track "*.wav"
git status
git add .
git status
git commit -m "add models"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d main
- name: Publish to huggingface (Transducer)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
with:
max_attempts: 5
timeout_seconds: 200
shell: bash
command: |
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
d=sherpa-onnx-nemo-transducer-giga-am-russian-2024-10-24/
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
rm -rf huggingface
git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d huggingface
mv -v $d/* ./huggingface
cp -av $d/* ./huggingface
cd huggingface
git lfs track "*.onnx"
git lfs track "*.wav"
git status
git add .
git status
git commit -m "add models"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d main
- name: Publish v2 to huggingface (CTC)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
with:
max_attempts: 5
timeout_seconds: 200
shell: bash
command: |
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
d=sherpa-onnx-nemo-ctc-giga-am-v2-russian-2025-04-19/
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
rm -rf huggingface
git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d huggingface
cp -av $d/* ./huggingface
cd huggingface
git lfs track "*.onnx"
git lfs track "*.wav"
@@ -145,7 +240,7 @@ jobs:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
with:
max_attempts: 20
max_attempts: 5
timeout_seconds: 200
shell: bash
command: |
@@ -155,8 +250,9 @@ jobs:
d=sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19/
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
rm -rf huggingface
git clone https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/$d huggingface
mv -v $d/* ./huggingface
cp -av $d/* ./huggingface
cd huggingface
git lfs track "*.onnx"
git lfs track "*.wav"