Fangjun Kuang
Committed by GitHub

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

... ... @@ -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
... ...
... ... @@ -130,6 +130,36 @@ def get_2nd_models():
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
""",
),
]
return models
... ... @@ -302,6 +332,14 @@ def get_models():
),
(
"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",
),
]
... ...
... ... @@ -387,6 +387,21 @@ def get_models():
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
""",
),
]
return models
... ...
... ... @@ -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
}
... ...