From 1c318519b2539db279406815207f6ff66ac2ad62 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 23 三月 2023 11:20:54 +0800
Subject: [PATCH] websocket
---
funasr/runtime/python/websocket/ASR_server.py | 4 ++--
funasr/runtime/python/websocket/ASR_client.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/funasr/runtime/python/websocket/ASR_client.py b/funasr/runtime/python/websocket/ASR_client.py
index 7dce880..081e6d5 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 time
import websockets
import asyncio
from queue import Queue
-import threading
+# import threading
voices = Queue()
async def hello():
global ws # 瀹氫箟涓�涓叏灞�鍙橀噺ws锛岀敤浜庝繚瀛榳ebsocket杩炴帴瀵硅薄
diff --git a/funasr/runtime/python/websocket/ASR_server.py b/funasr/runtime/python/websocket/ASR_server.py
index 3627d3a..0796a79 100644
--- a/funasr/runtime/python/websocket/ASR_server.py
+++ b/funasr/runtime/python/websocket/ASR_server.py
@@ -10,7 +10,7 @@
import websockets #鍖哄埆瀹㈡埛绔繖閲屾槸 websockets搴�
import time
from queue import Queue
-import threading
+import threading
print("model loading")
voices = Queue()
@@ -95,7 +95,7 @@
frames.append(data)
RECORD_NUM += 1
- if vad(data):
+ if vad(data):
if not speech_detected:
print("妫�娴嬪埌浜哄0...")
speech_detected = True # 鏍囪涓烘娴嬪埌璇煶
--
Gitblit v1.9.1