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
游雁1c318519b253
diff --git a/funasr/runtime/python/websocket/ASR_client.py b/funasr/runtime/python/websocket/ASR_client.pyindex 7dce8803f..081e6d595 100644--- a/funasr/runtime/python/websocket/ASR_client.py+++ b/funasr/runtime/python/websocket/ASR_client.py@@ -1,10 +1,10 @@import pyaudio-import websocket #区别服务端这里是 websocket-client库+# import websocket #区别服务端这里是 websocket-client库import timeimport websocketsimport asynciofrom queue import Queue-import threading+# import threadingvoices = Queue()async def hello():global ws # 定义一个全局变量ws,用于保存websocket连接对象diff --git a/funasr/runtime/python/websocket/ASR_server.py b/funasr/runtime/python/websocket/ASR_server.pyindex 3627d3a9b..0796a79d1 100644--- a/funasr/runtime/python/websocket/ASR_server.py+++ b/funasr/runtime/python/websocket/ASR_server.py@@ -10,7 +10,7 @@ import asyncioimport websockets #区别客户端这里是 websockets库import timefrom queue import Queue-import threading+import threadingprint("model loading")voices = Queue()@@ -95,7 +95,7 @@ def main(): # 推理frames.append(data)RECORD_NUM += 1- if vad(data):+ if vad(data):if not speech_detected:print("检测到人声...")speech_detected = True # 标记为检测到语音