Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Twirre <s.a.meulenbelt@students.uu.nl>
This commit is contained in:
Pim Hutting
2025-11-19 11:48:31 +00:00
parent 7120a7a8aa
commit f74efba511

View File

@@ -64,8 +64,8 @@ class Streaming(CyclicBehaviour):
async def reset(self):
"""Clears the ZeroMQ queue and tells this behavior to start."""
discarded = 0
poll_time = settings.behaviour_settings.vad_poll_time
while await self.audio_in_poller.poll(poll_time) is not None:
# Poll for the shortest amount of time possible to clear the queue
while await self.audio_in_poller.poll(1) is not None:
discarded += 1
self.agent.logger.info(f"Discarded {discarded} audio packets before starting.")
self._ready = True