Skip to content

Commit

Permalink
Add non-streaming zipformer Android APK (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Jun 24, 2024
1 parent e7a4510 commit 1f95bff
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/apk/generate-vad-asr-apk-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,27 @@ def get_models():
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-zipformer-korean-2024-06-24",
idx=13,
lang="ko",
short_name="zipformer",
cmd="""
pushd $model_name
rm -rfv test_wavs
rm -fv README.md
rm -fv bpe.model
rm encoder-epoch-99-avg-1.onnx
rm decoder-epoch-99-avg-1.int8.onnx
rm joiner-epoch-99-avg-1.onnx
ls -lh
popd
""",
),
Expand Down
13 changes: 13 additions & 0 deletions sherpa-onnx/kotlin-api/OfflineRecognizer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,19 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? {
modelType = "zipformer2",
)
}

13 -> {
val modelDir = "sherpa-onnx-zipformer-korean-2024-06-24"
return OfflineModelConfig(
transducer = OfflineTransducerModelConfig(
encoder = "$modelDir/encoder-epoch-99-avg-1.int8.onnx",
decoder = "$modelDir/decoder-epoch-99-avg-1.onnx",
joiner = "$modelDir/joiner-epoch-99-avg-1.int8.onnx",
),
tokens = "$modelDir/tokens.txt",
modelType = "zipformer2",
)
}
}
return null
}

0 comments on commit 1f95bff

Please sign in to comment.