Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
json stamp_sents
雾聪6be2975020ad
diff --git a/runtime/websocket/bin/websocket-server-2pass.cpp b/runtime/websocket/bin/websocket-server-2pass.cppindex 0269e5ff2..c251e1d22 100644--- a/runtime/websocket/bin/websocket-server-2pass.cpp+++ b/runtime/websocket/bin/websocket-server-2pass.cpp@@ -83,8 +83,15 @@ nlohmann::json handle_result(FUNASR_RESULT result) {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;