From 0de804892ba44499a0fdfe455e631b692b6f336e Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 27 Apr 2026 11:33:22 -0500 Subject: [PATCH] end any in-progress audio events when audio detection is disabled we already end in-progress audio events when we disable a camera, but this mirrors that logic for specifically disabling audio detection --- frigate/events/audio.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frigate/events/audio.py b/frigate/events/audio.py index f6c41fa30..6a22b2251 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -205,6 +205,7 @@ class AudioEventMaintainer(threading.Thread): self.transcription_thread.start() self.was_enabled = camera.enabled + self.was_audio_enabled = camera.audio.enabled def detect_audio(self, audio: np.ndarray) -> None: if not self.camera_config.audio.enabled or self.stop_event.is_set(): @@ -363,6 +364,17 @@ class AudioEventMaintainer(threading.Thread): time.sleep(0.1) continue + audio_enabled = self.camera_config.audio.enabled + if audio_enabled != self.was_audio_enabled: + if not audio_enabled: + self.logger.debug( + f"Disabling audio detections for {self.camera_config.name}, ending events" + ) + self.requestor.send_data( + EXPIRE_AUDIO_ACTIVITY, self.camera_config.name + ) + self.was_audio_enabled = audio_enabled + self.read_audio() if self.audio_listener: