Add two-pass ASR Android APKs for Moonshine models. (#1499)
This commit is contained in:
4
.github/workflows/apk-asr-2pass.yaml
vendored
4
.github/workflows/apk-asr-2pass.yaml
vendored
@@ -23,8 +23,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
total: ["2"]
|
total: ["4"]
|
||||||
index: ["0", "1"]
|
index: ["0", "1", "2", "3"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -127,6 +127,36 @@ def get_2nd_models():
|
|||||||
|
|
||||||
ls -lh
|
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
|
popd
|
||||||
""",
|
""",
|
||||||
),
|
),
|
||||||
@@ -300,6 +330,14 @@ def get_models():
|
|||||||
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
|
"sherpa-onnx-streaming-zipformer-en-20M-2023-02-17",
|
||||||
"sherpa-onnx-whisper-tiny.en",
|
"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-streaming-zipformer-en-20M-2023-02-17",
|
||||||
"sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
|
"sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17",
|
||||||
|
|||||||
@@ -384,6 +384,21 @@ def get_models():
|
|||||||
|
|
||||||
ls -lh
|
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
|
popd
|
||||||
""",
|
""",
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -438,6 +438,19 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? {
|
|||||||
tokens = "$modelDir/tokens.txt",
|
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
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user