From ae8f34e01cb57f78df748fcf90862a06001597c5 Mon Sep 17 00:00:00 2001 From: sayam93 <163408168+sayam93@users.noreply.github.com> Date: Thu, 26 Dec 2024 21:35:02 +0530 Subject: [PATCH] Revert "fix: adding timeout to WakeStreamingSatellite event_from_mic to keep it from getting stuck" This reverts commit 62c72801e5ef6808cead9b7530289a2b1a32fdc8. --- wyoming_satellite/satellite.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/wyoming_satellite/satellite.py b/wyoming_satellite/satellite.py index 7742c20..f1a8979 100644 --- a/wyoming_satellite/satellite.py +++ b/wyoming_satellite/satellite.py @@ -1199,10 +1199,6 @@ def __init__(self, settings: SatelliteSettings) -> None: # wake word id -> seconds self.refractory_timestamp: Dict[Optional[str], float] = {} - # Timestamp in the future when we will have timed out (set with - # time.monotonic()) - self.timeout_seconds: Optional[float] = None - if settings.vad.enabled: _LOGGER.warning("VAD is enabled but will not be used") @@ -1300,25 +1296,6 @@ async def event_from_mic( if self.stt_audio_writer is not None: self.stt_audio_writer.write(audio_bytes) - if ( self.is_streaming - and (self.timeout_seconds is not None) - and (time.monotonic() >= self.timeout_seconds) - ): - _LOGGER.debug("Streaming timed out, stopping") - # Time out during wake word recognition - self.is_streaming = False - self.timeout_seconds = None - - # Stop debug recording - if self.stt_audio_writer is not None: - self.stt_audio_writer.stop() - - # Stop pipeline - await self.event_to_server(AudioStop().event()) - - _LOGGER.info("Waiting for speech") - await self.trigger_streaming_stop() - if self.is_streaming: # Forward to server await self.event_to_server(event) @@ -1370,17 +1347,6 @@ async def event_from_wake(self, event: Event) -> None: # No refractory period self.refractory_timestamp.pop(detection.name, None) - # set our timeout window - if self.settings.vad.wake_word_timeout is not None: - # Set future time when we'll stop streaming if the wake word - # hasn't been detected. - self.timeout_seconds = ( - time.monotonic() + self.settings.vad.wake_word_timeout - ) - else: - # No timeout - self.timeout_seconds = None - # Forward to the server await self.event_to_server(event)