From d9c3466d54912b73d60b6065b069a4a998206aa2 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Fri, 25 Oct 2024 10:09:15 +0800 Subject: [PATCH] Update Andriod VAD+ASR APK --- scripts/apk/generate-vad-asr-apk-script.py | 18 ++++++++++++++++++ sherpa-onnx/kotlin-api/OfflineRecognizer.kt | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/scripts/apk/generate-vad-asr-apk-script.py b/scripts/apk/generate-vad-asr-apk-script.py index b6361427f..8217e6ea0 100755 --- a/scripts/apk/generate-vad-asr-apk-script.py +++ b/scripts/apk/generate-vad-asr-apk-script.py @@ -333,6 +333,24 @@ def get_models(): ls -lh + popd + """, + ), + Model( + model_name="sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24", + idx=19, + lang="ru", + short_name="nemo_ctc_giga_am", + cmd=""" + pushd $model_name + + rm -rfv test_wavs + + rm -fv *.sh + rm -fv *.py + + ls -lh + popd """, ), diff --git a/sherpa-onnx/kotlin-api/OfflineRecognizer.kt b/sherpa-onnx/kotlin-api/OfflineRecognizer.kt index 203278cb7..10cdc5179 100644 --- a/sherpa-onnx/kotlin-api/OfflineRecognizer.kt +++ b/sherpa-onnx/kotlin-api/OfflineRecognizer.kt @@ -394,6 +394,16 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? { modelType = "transducer", ) } + + 19 -> { + val modelDir = "sherpa-onnx-nemo-ctc-giga-am-russian-2024-10-24" + return OfflineModelConfig( + nemo = OfflineNemoEncDecCtcModelConfig( + model = "$modelDir/model.int8.onnx", + ), + tokens = "$modelDir/tokens.txt", + ) + } } return null }