Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Twirre <s.a.meulenbelt@students.uu.nl>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user