From 7cba01918c9f5400785965fdc5a3b3d36cf18cfc Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Tue, 3 Oct 2023 07:06:28 -0600 Subject: [PATCH] Fix a couple bugs --- 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}" )