[client] fix bugs
This commit is contained in:
1 parent
4c58ce3ce5
commit
032c295d0c
1 file changed
+2
-2
@@ -271,7 +271,7 @@ class WebSocketClinet:
|
||||
if self.sleep_event.is_set() or self.listening_event.is_set():
|
||||
break
|
||||
if self.interrupt_event.is_set():
|
||||
print(f"{datetime.now()}: conversation interrupt (input).")
|
||||
print(f"{datetime.now()}: button interrupt (input).")
|
||||
break
|
||||
if board == 'orangepi':
|
||||
recorder.hardware.set_led_off("red")
|
||||
@@ -478,7 +478,7 @@ class WebSocketClinet:
|
||||
break
|
||||
# 按键打断播放
|
||||
if self.interrupt_event.is_set():
|
||||
print(f"{datetime.now()}: button interrupt.")
|
||||
print(f"{datetime.now()}: button interrupt (output).")
|
||||
|
||||
time.sleep(0.3) # 虽然程序到这里,但是扬声器不一定播放完毕,延迟用来避免问题
|
||||
|
||||
|
||||
Reference in new issue
Block a user