From 8bde914939e99d9364a3704db8118ca5f90f6d29 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 7 Oct 2023 08:18:34 -0600 Subject: [PATCH] Fix a couple bugs (#8045) --- frigate/events/audio.py | 2 +- frigate/output.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/events/audio.py b/frigate/events/audio.py index 76bfd5fa8..a48061091 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -163,7 +163,7 @@ class AudioEventMaintainer(threading.Thread): self.recordings_info_queue = recordings_info_queue self.feature_metrics = feature_metrics self.inter_process_communicator = inter_process_communicator - self.detections: dict[dict[str, any]] = feature_metrics + self.detections: dict[dict[str, any]] = {} self.stop_event = stop_event self.detector = AudioTfl(stop_event, self.config.audio.num_threads) self.shape = (int(round(AUDIO_DURATION * AUDIO_SAMPLE_RATE)),) diff --git a/frigate/output.py b/frigate/output.py index 09c385dcf..4c72247d5 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -60,7 +60,7 @@ def get_canvas_shape(width: int, height: int) -> tuple[int, int]: if round(a_w / a_h, 2) != round(width / height, 2): canvas_width = width - canvas_height = (canvas_width / a_w) * a_h + canvas_height = int((canvas_width / a_w) * a_h) logger.warning( f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}" )