雾聪
2024-01-08 6be2975020ad3524fed585f519ae6d11f02eae4e
json stamp_sents
1个文件已修改
11 ■■■■ 已修改文件
runtime/websocket/bin/websocket-server-2pass.cpp 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;