Fix building for Android (#949)

This commit is contained in:
Fangjun Kuang
2024-05-31 10:27:29 +08:00
committed by GitHub
parent 1e277ae9b7
commit a689249f88
2 changed files with 4 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ class OnlineRecognizerTransducerNeMoImpl : public OnlineRecognizerImpl {
AAssetManager *mgr, const OnlineRecognizerConfig &config) AAssetManager *mgr, const OnlineRecognizerConfig &config)
: config_(config), : config_(config),
symbol_table_(mgr, config.model_config.tokens), symbol_table_(mgr, config.model_config.tokens),
endpoint_(mgrconfig_.endpoint_config), endpoint_(config_.endpoint_config),
model_(std::make_unique<OnlineTransducerNeMoModel>( model_(std::make_unique<OnlineTransducerNeMoModel>(
mgr, config.model_config)) { mgr, config.model_config)) {
if (config.decoding_method == "greedy_search") { if (config.decoding_method == "greedy_search") {

View File

@@ -62,17 +62,17 @@ class OnlineTransducerNeMoModel::Impl {
sess_opts_(GetSessionOptions(config)), sess_opts_(GetSessionOptions(config)),
allocator_{} { allocator_{} {
{ {
auto buf = ReadFile(mgr, config.transducer.encoder_filename); auto buf = ReadFile(mgr, config.transducer.encoder);
InitEncoder(buf.data(), buf.size()); InitEncoder(buf.data(), buf.size());
} }
{ {
auto buf = ReadFile(mgr, config.transducer.decoder_filename); auto buf = ReadFile(mgr, config.transducer.decoder);
InitDecoder(buf.data(), buf.size()); InitDecoder(buf.data(), buf.size());
} }
{ {
auto buf = ReadFile(mgr, config.transducer.joiner_filename); auto buf = ReadFile(mgr, config.transducer.joiner);
InitJoiner(buf.data(), buf.size()); InitJoiner(buf.data(), buf.size());
} }
} }