From 396ca27ef44fefc88c9f004f7d6f6fa3e4f8603d Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 8 Jul 2023 06:05:52 -0600 Subject: [PATCH] Update frigate/events/audio.py Co-authored-by: Blake Blackshear --- frigate/events/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/events/audio.py b/frigate/events/audio.py index b7abbbe7f..decd17ca4 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -169,7 +169,7 @@ class AudioEventMaintainer(threading.Thread): if not self.feature_metrics[self.config.name]["audio_enabled"].value: return - rms = np.sqrt(np.mean(np.absolute(audio.astype(np.float32) ** 2))) + rms = np.sqrt(np.mean(np.absolute(np.square(audio.astype(np.float32))))) # only run audio detection when volume is above min_volume if rms >= self.config.audio.min_volume: