Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

add buffer for nullptr res

雾聪37f078ef5f9f
diff --git a/runtime/websocket/bin/websocket-server.cpp b/runtime/websocket/bin/websocket-server.cpp
index 7f17d345d..ed25c951b 100644
--- a/runtime/websocket/bin/websocket-server.cpp
+++ b/runtime/websocket/bin/websocket-server.cpp
@@ -85,6 +85,7 @@ void WebSocketServer::do_decoder(const std::vector<char>& buffer,
stamp_sents = FunASRGetStampSents(Result);
FunASRFreeResult(Result);
} else{
+ std::this_thread::sleep_for(std::chrono::milliseconds(20));
LOG(ERROR) << "FUNASR_RESULT is nullptr.";
}
}catch (std::exception const& e) {