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
Python ws client slow problem for multiple files in offline mode (#716)
zhaomingwork4413d1eb47fa
diff --git a/funasr/runtime/python/websocket/funasr_wss_client.py b/funasr/runtime/python/websocket/funasr_wss_client.pyindex fad12ce0c..765addbce 100644--- a/funasr/runtime/python/websocket/funasr_wss_client.py+++ b/funasr/runtime/python/websocket/funasr_wss_client.py@@ -177,10 +177,9 @@ async def record_from_scp(chunk_begin, chunk_size):sleep_duration = 0.001 if args.mode == "offline" else 60 * args.chunk_size[1] / args.chunk_interval / 1000await asyncio.sleep(sleep_duration)- # when all data sent, we need to close websocket- while not voices.empty():- await asyncio.sleep(1)- await asyncio.sleep(3)++ if not args.mode=="offline":+ await asyncio.sleep(2)# offline model need to wait for message recvedif args.mode=="offline":