Fix building for Android (#949)
This commit is contained in:
@@ -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") {
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user