Răsfoiți Sursa

add logs for model load

雾聪 2 ani în urmă
părinte
comite
4382dcb15f

+ 1 - 0
funasr/runtime/onnxruntime/src/ct-transformer.cpp

@@ -18,6 +18,7 @@ void CTTransformer::InitPunc(const std::string &punc_model, const std::string &p
 
 
     try{
     try{
         m_session = std::make_unique<Ort::Session>(env_, punc_model.c_str(), session_options);
         m_session = std::make_unique<Ort::Session>(env_, punc_model.c_str(), session_options);
+        LOG(INFO) << "Successfully load model from " << punc_model;
     }
     }
     catch (std::exception const &e) {
     catch (std::exception const &e) {
         LOG(ERROR) << "Error when load punc onnx model: " << e.what();
         LOG(ERROR) << "Error when load punc onnx model: " << e.what();

+ 1 - 0
funasr/runtime/onnxruntime/src/paraformer.cpp

@@ -33,6 +33,7 @@ void Paraformer::InitAsr(const std::string &am_model, const std::string &am_cmvn
 
 
     try {
     try {
         m_session = std::make_unique<Ort::Session>(env_, am_model.c_str(), session_options);
         m_session = std::make_unique<Ort::Session>(env_, am_model.c_str(), session_options);
+        LOG(INFO) << "Successfully load model from " << am_model;
     } catch (std::exception const &e) {
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load am onnx model: " << e.what();
         LOG(ERROR) << "Error when load am onnx model: " << e.what();
         exit(0);
         exit(0);

+ 2 - 2
funasr/runtime/websocket/funasr-wss-client.cpp

@@ -217,7 +217,7 @@ class WebsocketClient {
                 }
                 }
             }
             }
             if (wait) {
             if (wait) {
-                LOG(INFO) << "wait.." << m_open;
+                // LOG(INFO) << "wait.." << m_open;
                 WaitABit();
                 WaitABit();
                 continue;
                 continue;
             }
             }
@@ -291,7 +291,7 @@ int main(int argc, char* argv[]) {
                                        false, 1, "int");
                                        false, 1, "int");
     TCLAP::ValueArg<int> is_ssl_(
     TCLAP::ValueArg<int> is_ssl_(
         "", "is-ssl", "is-ssl is 1 means use wss connection, or use ws connection", 
         "", "is-ssl", "is-ssl is 1 means use wss connection, or use ws connection", 
-        false, 0, "int");
+        false, 1, "int");
 
 
     cmd.add(server_ip_);
     cmd.add(server_ip_);
     cmd.add(port_);
     cmd.add(port_);