From f72914003a8c4ab7ae72d52dbd7c5f70ea22313a Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 18 十二月 2023 17:33:24 +0800
Subject: [PATCH] add sentence timestamp

---
 runtime/websocket/bin/websocket-server-2pass.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/runtime/websocket/bin/websocket-server-2pass.cpp b/runtime/websocket/bin/websocket-server-2pass.cpp
index 499c950..44dd82e 100644
--- a/runtime/websocket/bin/websocket-server-2pass.cpp
+++ b/runtime/websocket/bin/websocket-server-2pass.cpp
@@ -80,6 +80,12 @@
     jsonresult["timestamp"] = tmp_stamp_msg;
   }
 
+  std::string tmp_stamp_sents = FunASRGetStampSents(result);
+  if (tmp_stamp_sents != "") {
+    LOG(INFO) << "offline stamp_sents : " << tmp_stamp_sents;
+    jsonresult["stamp_sents"] = tmp_stamp_sents;
+  }
+
   return jsonresult;
 }
 // feed buffer to asr engine for decoder
@@ -318,7 +324,7 @@
         data_msg->msg["is_eof"]=true;
         guard_decoder.unlock();
         to_remove.push_back(hdl);
-        LOG(INFO)<<"connection is closed: "<<e.what();
+        LOG(INFO)<<"connection is closed.";
         
       }
       iter++;

--
Gitblit v1.9.1