Skip to content

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

websocket 2pass bugfix

游雁cfa1eaf88a45
diff --git a/funasr/runtime/python/websocket/ws_client.py b/funasr/runtime/python/websocket/ws_client.py
index 97ea552c2..de5a1d890 100644
--- a/funasr/runtime/python/websocket/ws_client.py
+++ b/funasr/runtime/python/websocket/ws_client.py
@@ -181,7 +181,7 @@ async def message(id):
ibest_writer["text"][wav_name] = text
if meg["mode"] == "online":
- text_print += " {}".format(text)
+ text_print += "{}".format(text)
text_print = text_print[-args.words_max_print:]
os.system('clear')
print("\rpid"+str(id)+": "+text_print)
@@ -192,7 +192,7 @@ async def message(id):
print("\rpid"+str(id)+": "+text_print)
else:
if meg["mode"] == "2pass-online":
- text_print_2pass_online += " {}".format(text)
+ text_print_2pass_online += "{}".format(text)
text_print = text_print_2pass_offline + text_print_2pass_online
else:
text_print_2pass_online = ""