From 8912e0696af069de47646fdb8a9d9c4e086e88b3 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期日, 14 一月 2024 23:42:11 +0800
Subject: [PATCH] Resolve merge conflict
---
runtime/onnxruntime/src/tpass-stream.cpp | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/runtime/onnxruntime/src/tpass-stream.cpp b/runtime/onnxruntime/src/tpass-stream.cpp
index a3e1b0e..b723e0f 100644
--- a/runtime/onnxruntime/src/tpass-stream.cpp
+++ b/runtime/onnxruntime/src/tpass-stream.cpp
@@ -66,6 +66,20 @@
LOG(ERROR) <<"Can not find offline-model-dir or online-model-dir";
exit(-1);
}
+
+ // Lm resource
+ if (model_path.find(LM_DIR) != model_path.end() && model_path.at(LM_DIR) != "") {
+ string fst_path, lm_config_path, lex_path;
+ fst_path = PathAppend(model_path.at(LM_DIR), LM_FST_RES);
+ lm_config_path = PathAppend(model_path.at(LM_DIR), LM_CONFIG_NAME);
+ lex_path = PathAppend(model_path.at(LM_DIR), LEX_PATH);
+ if (access(lex_path.c_str(), F_OK) != 0 )
+ {
+ LOG(ERROR) << "Lexicon.txt file is not exist, please use the latest version. Skip load LM model.";
+ }else{
+ asr_handle->InitLm(fst_path, lm_config_path, lex_path);
+ }
+ }
// PUNC model
if(model_path.find(PUNC_DIR) != model_path.end()){
--
Gitblit v1.9.1