Add two-pass ASR Android APKs for Moonshine models. (#1499)

This commit is contained in:
Fangjun Kuang
2024-10-31 17:54:16 +08:00
committed by GitHub
parent 9fa3bc40d7
commit a3c89aa0d8
4 changed files with 68 additions and 2 deletions

View File

@@ -23,8 +23,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
total: ["2"]
index: ["0", "1"]
total: ["4"]
index: ["0", "1", "2", "3"]
steps:
- uses: actions/checkout@v4

View File

@@ -127,6 +127,36 @@ def get_2nd_models():
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-moonshine-tiny-en-int8",
idx=21,
lang="en",
short_name="moonshine_tiny_int8",
cmd="""
pushd $model_name
rm -rfv test_wavs
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-moonshine-base-en-int8",
idx=22,
lang="en",
short_name="moonshine_base_int8",
cmd="""
pushd $model_name
rm -rfv test_wavs
ls -lh
popd
""",
),
@@ -300,6 +330,14 @@ def get_models():
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
"sherpa-onnx-whisper-tiny.en",
),
(
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
"sherpa-onnx-moonshine-tiny-en-int8",
),
(
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
"sherpa-onnx-moonshine-base-en-int8",
),
(
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
"sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",

View File

@@ -384,6 +384,21 @@ def get_models():
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-moonshine-base-en-int8",
idx=22,
lang="en",
short_name="moonshine_base_int8",
cmd="""
pushd $model_name
rm -rfv test_wavs
ls -lh
popd
""",
),

View File

@@ -438,6 +438,19 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? {
tokens = "$modelDir/tokens.txt",
)
}
22 -> {
val modelDir = "sherpa-onnx-moonshine-base-en-int8"
return OfflineModelConfig(
moonshine = OfflineMoonshineModelConfig(
preprocessor = "$modelDir/preprocess.onnx",
encoder = "$modelDir/encode.int8.onnx",
uncachedDecoder = "$modelDir/uncached_decode.int8.onnx",
cachedDecoder = "$modelDir/cached_decode.int8.onnx",
),
tokens = "$modelDir/tokens.txt",
)
}
}
return null
}