[bug] board
This commit is contained in:
parent
10b5671726
commit
b564941a3f
|
@ -480,10 +480,15 @@ class WebSocketClinet:
|
|||
except TypeError as e:
|
||||
print(f"audio play error: {e}")
|
||||
continue
|
||||
|
||||
|
||||
elif item[0] == 'audio_json':
|
||||
print(f"data_type: {data_type}")
|
||||
if self.wakeup_event.is_set():
|
||||
if data_type == 'end':
|
||||
if data_type == 'text':
|
||||
# 切换播放模式
|
||||
self.listening_event.clear()
|
||||
self.speaking_event.set()
|
||||
if data_type in ['close', 'end']:
|
||||
# 启动监听状态
|
||||
self.speaking_event.clear()
|
||||
self.listening_event.set()
|
||||
|
|
Loading…
Reference in New Issue