From 33d3d2084403fd34b79c835d2f2fe04f6cd8f738 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 13 九月 2023 09:33:54 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add

---
 funasr/runtime/websocket/websocket-server-2pass.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/funasr/runtime/websocket/websocket-server-2pass.h b/funasr/runtime/websocket/websocket-server-2pass.h
index 21b98ca..c4fbed3 100644
--- a/funasr/runtime/websocket/websocket-server-2pass.h
+++ b/funasr/runtime/websocket/websocket-server-2pass.h
@@ -54,11 +54,11 @@
   nlohmann::json msg;
   std::shared_ptr<std::vector<char>> samples;
   std::shared_ptr<std::vector<std::vector<std::string>>> punc_cache;
-  websocketpp::lib::mutex* thread_lock; // lock for each connection
+  std::shared_ptr<websocketpp::lib::mutex> thread_lock; // lock for each connection
   FUNASR_HANDLE tpass_online_handle=NULL;
   std::string online_res = "";
   std::string tpass_res = "";
-  
+  std::shared_ptr<asio::io_context::strand>  strand_; // for data execute in order 
 } FUNASR_MESSAGE;
 
 // See https://wiki.mozilla.org/Security/Server_Side_TLS for more details about
@@ -115,8 +115,8 @@
                   nlohmann::json& msg,
                   std::vector<std::vector<std::string>>& punc_cache,
                   websocketpp::lib::mutex& thread_lock, bool& is_final,
-                  FUNASR_HANDLE& tpass_online_handle, std::string& online_res,
-                  std::string& tpass_res);
+                  std::string wav_name,
+                  FUNASR_HANDLE& tpass_online_handle);
 
   void initAsr(std::map<std::string, std::string>& model_path, int thread_num);
   void on_message(websocketpp::connection_hdl hdl, message_ptr msg);

--
Gitblit v1.9.1