mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Formatting
This commit is contained in:
parent
9f8e2fd51c
commit
0fa7c744ba
@ -388,7 +388,7 @@ class FrigateApp:
|
||||
if len([c for c in self.config.cameras.values() if c.audio.enabled]) > 0:
|
||||
audio_process = mp.Process(
|
||||
target=listen_to_audio,
|
||||
name=f"audio_capture",
|
||||
name="audio_capture",
|
||||
args=(self.config, self.feature_metrics),
|
||||
)
|
||||
audio_process.daemon = True
|
||||
|
||||
@ -166,7 +166,7 @@ class AudioEventMaintainer(threading.Thread):
|
||||
if not self.feature_metrics[self.config.name]["audio_enabled"].value:
|
||||
return
|
||||
|
||||
logger.error(f"Running audio inference")
|
||||
logger.error("Running audio inference")
|
||||
|
||||
waveform = (audio / AUDIO_MAX_BIT_RANGE).astype(np.float32)
|
||||
model_detections = self.detector.detect(waveform)
|
||||
@ -232,7 +232,8 @@ class AudioEventMaintainer(threading.Thread):
|
||||
try:
|
||||
audio = np.frombuffer(self.pipe_file.read(self.chunk_size), dtype=np.int16)
|
||||
self.detect_audio(audio)
|
||||
except BrokenPipeError as e:
|
||||
except BrokenPipeError:
|
||||
self.logpipe.dump()
|
||||
self.restart_audio_pipe()
|
||||
|
||||
def run(self) -> None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user