From 6bd6d3383f3ee3b70a94e76adf083572437a0ac6 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:08:50 -0500 Subject: [PATCH] fix hardware stats crash when audio transcription is enabled (#24164) --- frigate/stats/hardware.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frigate/stats/hardware.py b/frigate/stats/hardware.py index 70062152b2..f94e9de2e1 100644 --- a/frigate/stats/hardware.py +++ b/frigate/stats/hardware.py @@ -427,13 +427,15 @@ class HardwareStats: if config.lpr.enabled and (config.lpr.device or "AUTO") != "CPU": names.add(gpu) - # audio transcription runs on CUDA only - transcription_configs = [config.audio_transcription] + [ - camera.audio_transcription for camera in config.cameras.values() - ] + # audio transcription runs on CUDA only, and the device is global only + transcription = config.audio_transcription + transcription_enabled = transcription.enabled or any( + camera.audio_transcription.enabled for camera in config.cameras.values() + ) if ( - any(c.enabled and c.device == "GPU" for c in transcription_configs) + transcription_enabled + and transcription.device == "GPU" and "onnx:nvidia" in _present_hardware() and _gpu_device_nodes_exist("nvidia") ):