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
websocket bug
游雁7314f0795c47
diff --git a/funasr/runtime/html5/demo.gif b/funasr/runtime/html5/demo.gifdeleted file mode 100644index f487f2c66..000000000Binary files a/funasr/runtime/html5/demo.gif and /dev/null differdiff --git a/funasr/runtime/python/websocket/funasr_wss_client.py b/funasr/runtime/python/websocket/funasr_wss_client.pyindex 72121f73c..264014f05 100644--- a/funasr/runtime/python/websocket/funasr_wss_client.py+++ b/funasr/runtime/python/websocket/funasr_wss_client.py@@ -204,6 +204,7 @@ async def message(id):meg = await websocket.recv()meg = json.loads(meg)+ print(meg)wav_name = meg.get("wav_name", "demo")text = meg["text"]diff --git a/funasr/runtime/python/websocket/funasr_wss_server.py b/funasr/runtime/python/websocket/funasr_wss_server.pyindex 4929090d8..2aff9ba0e 100644--- a/funasr/runtime/python/websocket/funasr_wss_server.py+++ b/funasr/runtime/python/websocket/funasr_wss_server.py@@ -240,7 +240,8 @@ async def async_asr(websocket, audio_in):param_dict=websocket.param_dict_punc)# print("offline", rec_result)if 'text' in rec_result:- message = json.dumps({"mode": websocket.mode, "text": rec_result["text"], "wav_name": websocket.wav_name})+ mode = "2pass-offline" if "2pass" in websocket.mode else websocket.mode+ message = json.dumps({"mode": mode, "text": rec_result["text"], "wav_name": websocket.wav_name})await websocket.send(message)@@ -256,7 +257,8 @@ async def async_asr_online(websocket, audio_in):if "text" in rec_result:if rec_result["text"] != "sil" and rec_result["text"] != "waiting_for_more_voice":# print("online", rec_result)- message = json.dumps({"mode": websocket.mode, "text": rec_result["text"], "wav_name": websocket.wav_name})+ mode = "2pass-online" if "2pass" in websocket.mode else websocket.mode+ message = json.dumps({"mode": mode, "text": rec_result["text"], "wav_name": websocket.wav_name})await websocket.send(message)if len(args.certfile)>0: