From b831792f035ab5c4b2ab915ce1b5220dddd0a78a Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 24 三月 2023 17:10:48 +0800
Subject: [PATCH] websocket
---
funasr/runtime/python/websocket/ASR_server.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/runtime/python/websocket/ASR_server.py b/funasr/runtime/python/websocket/ASR_server.py
index 79c3a7a..b7c42d1 100644
--- a/funasr/runtime/python/websocket/ASR_server.py
+++ b/funasr/runtime/python/websocket/ASR_server.py
@@ -153,8 +153,8 @@
rec_result = inference_pipeline_asr(audio_in=audio_in)
if inference_pipeline_punc is not None and 'text' in rec_result:
rec_result = inference_pipeline_punc(text_in=rec_result['text'], param_dict=param_dict_punc)
- results = (rec_result["text"] if "text" in rec_result else rec_result)
- websocket.send_msg.put(results) # 瀛樺叆鍙戦�侀槦鍒� 鐩存帴璋冪敤send鍙戦�佷笉浜�
+ if "text" in rec_result:
+ websocket.send_msg.put(rec_result["text"]) # 瀛樺叆鍙戦�侀槦鍒� 鐩存帴璋冪敤send鍙戦�佷笉浜�
time.sleep(0.1)
--
Gitblit v1.9.1