feat: ignore own speech

When we detect that Pepper is talking we stop sending audio.

ref: N25B-214
This commit is contained in:
2025-10-27 13:08:57 +01:00
parent 230ab5d5cc
commit b4814d431f
4 changed files with 36 additions and 0 deletions

View File

@@ -43,8 +43,19 @@ def main_loop(context):
logging.debug("Starting main loop.")
import schedule
test_speaking_message = {"data": "Hi, my name is Pepper, and this is quite a long message."}
def test_speak():
logging.debug("Testing speech.")
actuation_receiver._handle_speech(test_speaking_message)
schedule.every(10).seconds.do(test_speak)
while True:
if state.exit_event.is_set(): break
schedule.run_pending()
socks = dict(poller.poll(100))
for receiver in receivers: