mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-25 05:41:53 +03:00
start audio transcription post processor when enabled on any camera
This commit is contained in:
parent
620923c27e
commit
da8e766298
@ -232,7 +232,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.config.audio_transcription.enabled and any(
|
if any(
|
||||||
c.enabled_in_config and c.audio_transcription.enabled
|
c.enabled_in_config and c.audio_transcription.enabled
|
||||||
for c in self.config.cameras.values()
|
for c in self.config.cameras.values()
|
||||||
):
|
):
|
||||||
|
|||||||
@ -100,7 +100,10 @@ class AudioProcessor(FrigateProcess):
|
|||||||
|
|
||||||
threading.current_thread().name = "process:audio_manager"
|
threading.current_thread().name = "process:audio_manager"
|
||||||
|
|
||||||
if self.config.audio_transcription.enabled:
|
if any(
|
||||||
|
c.enabled_in_config and c.audio_transcription.enabled
|
||||||
|
for c in self.config.cameras.values()
|
||||||
|
):
|
||||||
self.transcription_model_runner: AudioTranscriptionModelRunner | None = (
|
self.transcription_model_runner: AudioTranscriptionModelRunner | None = (
|
||||||
AudioTranscriptionModelRunner(
|
AudioTranscriptionModelRunner(
|
||||||
self.config.audio_transcription.device or "AUTO",
|
self.config.audio_transcription.device or "AUTO",
|
||||||
@ -206,7 +209,7 @@ class AudioEventMaintainer(threading.Thread):
|
|||||||
self.detection_publisher = DetectionPublisher(DetectionTypeEnum.audio.value)
|
self.detection_publisher = DetectionPublisher(DetectionTypeEnum.audio.value)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self.config.audio_transcription.enabled
|
self.camera_config.audio_transcription.enabled
|
||||||
and self.audio_transcription_model_runner is not None
|
and self.audio_transcription_model_runner is not None
|
||||||
):
|
):
|
||||||
# init the transcription processor for this camera
|
# init the transcription processor for this camera
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user