Reduce onnxruntime log output. (#1306)
Change the logging level from WARNING to ERROR.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace sherpa_onnx {
|
||||
|
||||
OnlineZipformer2TransducerModel::OnlineZipformer2TransducerModel(
|
||||
const OnlineModelConfig &config)
|
||||
: env_(ORT_LOGGING_LEVEL_WARNING),
|
||||
: env_(ORT_LOGGING_LEVEL_ERROR),
|
||||
encoder_sess_opts_(GetSessionOptions(config)),
|
||||
decoder_sess_opts_(GetSessionOptions(config, "decoder")),
|
||||
joiner_sess_opts_(GetSessionOptions(config, "joiner")),
|
||||
@@ -57,7 +57,7 @@ OnlineZipformer2TransducerModel::OnlineZipformer2TransducerModel(
|
||||
#if __ANDROID_API__ >= 9
|
||||
OnlineZipformer2TransducerModel::OnlineZipformer2TransducerModel(
|
||||
AAssetManager *mgr, const OnlineModelConfig &config)
|
||||
: env_(ORT_LOGGING_LEVEL_WARNING),
|
||||
: env_(ORT_LOGGING_LEVEL_ERROR),
|
||||
config_(config),
|
||||
encoder_sess_opts_(GetSessionOptions(config)),
|
||||
decoder_sess_opts_(GetSessionOptions(config)),
|
||||
@@ -82,8 +82,8 @@ OnlineZipformer2TransducerModel::OnlineZipformer2TransducerModel(
|
||||
|
||||
void OnlineZipformer2TransducerModel::InitEncoder(void *model_data,
|
||||
size_t model_data_length) {
|
||||
encoder_sess_ = std::make_unique<Ort::Session>(env_, model_data,
|
||||
model_data_length, encoder_sess_opts_);
|
||||
encoder_sess_ = std::make_unique<Ort::Session>(
|
||||
env_, model_data, model_data_length, encoder_sess_opts_);
|
||||
|
||||
GetInputNames(encoder_sess_.get(), &encoder_input_names_,
|
||||
&encoder_input_names_ptr_);
|
||||
@@ -135,8 +135,8 @@ void OnlineZipformer2TransducerModel::InitEncoder(void *model_data,
|
||||
|
||||
void OnlineZipformer2TransducerModel::InitDecoder(void *model_data,
|
||||
size_t model_data_length) {
|
||||
decoder_sess_ = std::make_unique<Ort::Session>(env_, model_data,
|
||||
model_data_length, decoder_sess_opts_);
|
||||
decoder_sess_ = std::make_unique<Ort::Session>(
|
||||
env_, model_data, model_data_length, decoder_sess_opts_);
|
||||
|
||||
GetInputNames(decoder_sess_.get(), &decoder_input_names_,
|
||||
&decoder_input_names_ptr_);
|
||||
@@ -160,8 +160,8 @@ void OnlineZipformer2TransducerModel::InitDecoder(void *model_data,
|
||||
|
||||
void OnlineZipformer2TransducerModel::InitJoiner(void *model_data,
|
||||
size_t model_data_length) {
|
||||
joiner_sess_ = std::make_unique<Ort::Session>(env_, model_data,
|
||||
model_data_length, joiner_sess_opts_);
|
||||
joiner_sess_ = std::make_unique<Ort::Session>(
|
||||
env_, model_data, model_data_length, joiner_sess_opts_);
|
||||
|
||||
GetInputNames(joiner_sess_.get(), &joiner_input_names_,
|
||||
&joiner_input_names_ptr_);
|
||||
|
||||
Reference in New Issue
Block a user