diff --git a/.github/workflows/upload-models.yaml b/.github/workflows/upload-models.yaml new file mode 100644 index 00000000..eebeae9c --- /dev/null +++ b/.github/workflows/upload-models.yaml @@ -0,0 +1,216 @@ +name: upload-models + +on: + push: + branches: + - upload-models + workflow_dispatch: + +concurrency: + group: upload-models-${{ github.ref }} + cancel-in-progress: true + +jobs: + upload-models: + if: github.repository_owner == 'k2-fsa' || github.repository_owner == 'csukuangfj' + name: upload models + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.8"] + + steps: + - uses: actions/checkout@v4 + + - name: Vietnamese (zipformer) + shell: bash + run: | + rm -rf models + mkdir models + cd models + cat >README.md <README.md < { + val modelDir = "sherpa-onnx-zipformer-vi-int8-2025-04-20" + return OfflineModelConfig( + transducer = OfflineTransducerModelConfig( + encoder = "$modelDir/encoder-epoch-12-avg-8.int8.onnx", + decoder = "$modelDir/decoder-epoch-12-avg-8.onnx", + joiner = "$modelDir/joiner-epoch-12-avg-8.int8.onnx", + ), + tokens = "$modelDir/tokens.txt", + modelType = "transducer", + ) + } + + 27 -> { + val modelDir = "sherpa-onnx-nemo-ctc-giga-am-v2-russian-2025-04-19" + return OfflineModelConfig( + nemo = OfflineNemoEncDecCtcModelConfig( + model = "$modelDir/model.int8.onnx", + ), + tokens = "$modelDir/tokens.txt", + ) + } + + 28 -> { + val modelDir = "sherpa-onnx-nemo-transducer-giga-am-v2-russian-2025-04-19" + return OfflineModelConfig( + transducer = OfflineTransducerModelConfig( + encoder = "$modelDir/encoder.int8.onnx", + decoder = "$modelDir/decoder.onnx", + joiner = "$modelDir/joiner.onnx", + ), + tokens = "$modelDir/tokens.txt", + modelType = "nemo_transducer", + ) + } + + 29 -> { + val modelDir = "sherpa-onnx-zipformer-ru-int8-2025-04-20" + return OfflineModelConfig( + transducer = OfflineTransducerModelConfig( + encoder = "$modelDir/encoder.int8.onnx", + decoder = "$modelDir/decoder.onnx", + joiner = "$modelDir/joiner.int8.onnx", + ), + tokens = "$modelDir/tokens.txt", + modelType = "transducer", + ) + } } return null }