Add Android APK for Korean (#1015)

This commit is contained in:
Fangjun Kuang
2024-06-16 19:17:15 +08:00
committed by GitHub
parent 99a9da19de
commit e1201225f2
3 changed files with 35 additions and 1 deletions

View File

@@ -209,6 +209,27 @@ def get_models():
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-streaming-zipformer-korean-2024-06-16",
idx=14,
lang="ko",
short_name="zipformer",
cmd="""
pushd $model_name
rm -fv decoder-epoch-99-avg-1.int8.onnx
rm -fv encoder-epoch-99-avg-1.onnx
rm -fv joiner-epoch-99-avg-1.onnx
rm -fv bpe.model
rm -fv README.md
rm -fv .gitattributes
rm -rfv test_wavs
ls -lh
popd
""",
),

View File

@@ -364,7 +364,7 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
}
// reset encoder states
s->SetStates(model_->GetEncoderInitStates());
// s->SetStates(model_->GetEncoderInitStates());
// we keep the decoder_out
decoder_->UpdateDecoderOut(&s->GetResult());

View File

@@ -355,6 +355,19 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
tokens = "$modelDir/tokens.txt",
)
}
14 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-korean-2024-06-16"
return OnlineModelConfig(
transducer = OnlineTransducerModelConfig(
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 = "zipformer",
)
}
}
return null
}