Implement the VAD agent #10

Merged
0950726 merged 9 commits from feat/vad-agent into dev 2025-10-29 08:15:25 +00:00
Showing only changes of commit 1cfefc8f8c - Show all commits

View File

@@ -58,8 +58,10 @@ class Streaming(CyclicBehaviour):
async def run(self) -> None:
data = await self.audio_in_poller.poll()
if data is None:
logger.debug("No audio data received. Discarding buffer until new data arrives.")
self.audio_buffer = np.array([], dtype=np.float32)
if len(self.audio_buffer) > 0:
logger.debug("No audio data received. Discarding buffer until new data arrives.")
self.audio_buffer = np.array([], dtype=np.float32)
self.i_since_speech = 100
return
# copy otherwise Torch will be sad that it's immutable