feat: implemented forced speech and speech queue
This commit is contained in:
committed by
Pim Hutting
parent
1e77548622
commit
e51cf8fe65
@@ -89,6 +89,7 @@ class AudioSender(SocketBase):
|
||||
try:
|
||||
while not state.exit_event.is_set():
|
||||
data = stream.read(chunk)
|
||||
if (state.is_speaking): continue # Do not send audio while the robot is speaking
|
||||
self.socket.send(data)
|
||||
except IOError as e:
|
||||
logger.error("Stopped listening: failed to get audio from microphone.", exc_info=e)
|
||||
|
||||
Reference in New Issue
Block a user