雾聪
2023-12-18 f72914003a8c4ab7ae72d52dbd7c5f70ea22313a
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
@@ -232,7 +238,7 @@
    data_msg->msg["wav_name"] = "wav-default-id";
    data_msg->msg["mode"] = "2pass";
    data_msg->msg["itn"] = true;
    data_msg->msg["audio_fs"] = 16000;
    data_msg->msg["audio_fs"] = 16000; // default is 16k
    data_msg->msg["access_num"] = 0; // the number of access for this object, when it is 0, we can free it saftly
    data_msg->msg["is_eof"]=false; // if this connection is closed
    data_msg->punc_cache =
@@ -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++;