From 7edad6fba36a7527c1857a38b77a0277e8fde582 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 29 十月 2024 15:11:54 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR merge
---
runtime/onnxruntime/src/paraformer.cpp | 27 +++------------------------
1 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/runtime/onnxruntime/src/paraformer.cpp b/runtime/onnxruntime/src/paraformer.cpp
index 24f5152..7e1fe96 100644
--- a/runtime/onnxruntime/src/paraformer.cpp
+++ b/runtime/onnxruntime/src/paraformer.cpp
@@ -131,9 +131,10 @@
}
// 2pass
-void Paraformer::InitAsr(const std::string &am_model, const std::string &en_model, const std::string &de_model, const std::string &am_cmvn, const std::string &am_config, const std::string &token_file, int thread_num){
+void Paraformer::InitAsr(const std::string &am_model, const std::string &en_model, const std::string &de_model,
+ const std::string &am_cmvn, const std::string &am_config, const std::string &token_file, const std::string &online_token_file, int thread_num){
// online
- InitAsr(en_model, de_model, am_cmvn, am_config, token_file, thread_num);
+ InitAsr(en_model, de_model, am_cmvn, am_config, online_token_file, thread_num);
// offline
try {
@@ -144,28 +145,6 @@
exit(-1);
}
- // string strName;
- // GetInputName(m_session_.get(), strName);
- // m_strInputNames.push_back(strName.c_str());
- // GetInputName(m_session_.get(), strName,1);
- // m_strInputNames.push_back(strName);
-
- // if (use_hotword) {
- // GetInputName(m_session_.get(), strName, 2);
- // m_strInputNames.push_back(strName);
- // }
-
- // // support time stamp
- // size_t numOutputNodes = m_session_->GetOutputCount();
- // for(int index=0; index<numOutputNodes; index++){
- // GetOutputName(m_session_.get(), strName, index);
- // m_strOutputNames.push_back(strName);
- // }
-
- // for (auto& item : m_strInputNames)
- // m_szInputNames.push_back(item.c_str());
- // for (auto& item : m_strOutputNames)
- // m_szOutputNames.push_back(item.c_str());
GetInputNames(m_session_.get(), m_strInputNames, m_szInputNames);
GetOutputNames(m_session_.get(), m_strOutputNames, m_szOutputNames);
}
--
Gitblit v1.9.1