From 134a33c991c043cab827f6e60b00ae02eb99c6d1 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 10 May 2024 15:05:14 +0800 Subject: [PATCH] =?UTF-8?q?2024.5.10-=E5=8E=BB=E9=99=A4ITN=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- decoder/params.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/decoder/params.h b/decoder/params.h index c3672c8..59c8ff9 100644 --- a/decoder/params.h +++ b/decoder/params.h @@ -261,21 +261,21 @@ std::shared_ptr InitDecodeResourceFromFlags() { resource->post_processor = std::make_shared(std::move(post_process_opts)); - if (!FLAGS_itn_model_dir.empty()) { // With ITN - std::string itn_tagger_path = - wenet::JoinPath(FLAGS_itn_model_dir, "zh_itn_tagger.fst"); - std::string itn_verbalizer_path = - wenet::JoinPath(FLAGS_itn_model_dir, "zh_itn_verbalizer.fst"); - if (wenet::FileExists(itn_tagger_path) && - wenet::FileExists(itn_verbalizer_path)) { - LOG(INFO) << "Reading ITN fst" << FLAGS_itn_model_dir; - post_process_opts.itn = true; - auto postprocessor = - std::make_shared(std::move(post_process_opts)); - postprocessor->InitITNResource(itn_tagger_path, itn_verbalizer_path); - resource->post_processor = postprocessor; - } - } +// if (!FLAGS_itn_model_dir.empty()) { // With ITN +// std::string itn_tagger_path = +// wenet::JoinPath(FLAGS_itn_model_dir, "zh_itn_tagger.fst"); +// std::string itn_verbalizer_path = +// wenet::JoinPath(FLAGS_itn_model_dir, "zh_itn_verbalizer.fst"); +// if (wenet::FileExists(itn_tagger_path) && +// wenet::FileExists(itn_verbalizer_path)) { +// LOG(INFO) << "Reading ITN fst" << FLAGS_itn_model_dir; +// post_process_opts.itn = true; +// auto postprocessor = +// std::make_shared(std::move(post_process_opts)); +// postprocessor->InitITNResource(itn_tagger_path, itn_verbalizer_path); +// resource->post_processor = postprocessor; +// } +// } return resource; }