Fangjun Kuang
Committed by GitHub

Add Android APK for Korean (#1015)

@@ -212,6 +212,27 @@ def get_models(): @@ -212,6 +212,27 @@ def get_models():
212 popd 212 popd
213 """, 213 """,
214 ), 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 +
  233 + popd
  234 + """,
  235 + ),
215 ] 236 ]
216 237
217 return models 238 return models
@@ -364,7 +364,7 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl { @@ -364,7 +364,7 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
364 } 364 }
365 365
366 // reset encoder states 366 // reset encoder states
367 - s->SetStates(model_->GetEncoderInitStates()); 367 + // s->SetStates(model_->GetEncoderInitStates());
368 368
369 // we keep the decoder_out 369 // we keep the decoder_out
370 decoder_->UpdateDecoderOut(&s->GetResult()); 370 decoder_->UpdateDecoderOut(&s->GetResult());
@@ -355,6 +355,19 @@ fun getModelConfig(type: Int): OnlineModelConfig? { @@ -355,6 +355,19 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
355 tokens = "$modelDir/tokens.txt", 355 tokens = "$modelDir/tokens.txt",
356 ) 356 )
357 } 357 }
  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 + }
358 } 371 }
359 return null 372 return null
360 } 373 }