From 27e8ba254adbe9f0df50b4969c5d2e66e0c7c0de Mon Sep 17 00:00:00 2001
From: jaluik <37829041+jaluik@users.noreply.github.com>
Date: 星期二, 09 一月 2024 10:57:03 +0800
Subject: [PATCH] docs: update docker tag (#1227)

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

diff --git a/runtime/websocket/bin/websocket-server-2pass.cpp b/runtime/websocket/bin/websocket-server-2pass.cpp
index 0269e5f..c251e1d 100644
--- a/runtime/websocket/bin/websocket-server-2pass.cpp
+++ b/runtime/websocket/bin/websocket-server-2pass.cpp
@@ -83,8 +83,15 @@
 
   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;
+    try{
+      nlohmann::json json_stamp = nlohmann::json::parse(tmp_stamp_sents);
+      LOG(INFO) << "offline stamp_sents : " << json_stamp;
+      jsonresult["stamp_sents"] = json_stamp;
+    }catch (std::exception const &e)
+    {
+      LOG(ERROR)<< tmp_stamp_sents << e.what();
+      jsonresult["stamp_sents"] = "";
+    }
   }
 
   return jsonresult;

--
Gitblit v1.9.1