Skip to content

Commit 1a607f5

Browse files
authored
Add Android APK for Korean (k2-fsa#1015)
1 parent 2e96453 commit 1a607f5

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

scripts/apk/generate-asr-apk-script.py

+21
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,27 @@ def get_models():
209209
210210
ls -lh
211211
212+
popd
213+
""",
214+
),
215+
Model(
216+
model_name="sherpa-onnx-streaming-zipformer-korean-2024-06-16",
217+
idx=14,
218+
lang="ko",
219+
short_name="zipformer",
220+
cmd="""
221+
pushd $model_name
222+
rm -fv decoder-epoch-99-avg-1.int8.onnx
223+
rm -fv encoder-epoch-99-avg-1.onnx
224+
rm -fv joiner-epoch-99-avg-1.onnx
225+
226+
rm -fv bpe.model
227+
rm -fv README.md
228+
rm -fv .gitattributes
229+
rm -rfv test_wavs
230+
231+
ls -lh
232+
212233
popd
213234
""",
214235
),

sherpa-onnx/csrc/online-recognizer-transducer-impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
364364
}
365365

366366
// reset encoder states
367-
s->SetStates(model_->GetEncoderInitStates());
367+
// s->SetStates(model_->GetEncoderInitStates());
368368

369369
// we keep the decoder_out
370370
decoder_->UpdateDecoderOut(&s->GetResult());

sherpa-onnx/kotlin-api/OnlineRecognizer.kt

+13
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,19 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
355355
tokens = "$modelDir/tokens.txt",
356356
)
357357
}
358+
359+
14 -> {
360+
val modelDir = "sherpa-onnx-streaming-zipformer-korean-2024-06-16"
361+
return OnlineModelConfig(
362+
transducer = OnlineTransducerModelConfig(
363+
encoder = "$modelDir/encoder-epoch-99-avg-1.int8.onnx",
364+
decoder = "$modelDir/decoder-epoch-99-avg-1.onnx",
365+
joiner = "$modelDir/joiner-epoch-99-avg-1.int8.onnx",
366+
),
367+
tokens = "$modelDir/tokens.txt",
368+
modelType = "zipformer",
369+
)
370+
}
358371
}
359372
return null
360373
}

0 commit comments

Comments
 (0)