mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 12:07:40 +03:00
embeddings maintainer support for post processor
This commit is contained in:
parent
c5dfc36171
commit
cc21ea0761
@ -37,6 +37,9 @@ from frigate.data_processing.common.license_plate.model import (
|
|||||||
LicensePlateModelRunner,
|
LicensePlateModelRunner,
|
||||||
)
|
)
|
||||||
from frigate.data_processing.post.api import PostProcessorApi
|
from frigate.data_processing.post.api import PostProcessorApi
|
||||||
|
from frigate.data_processing.post.audio_transcription import (
|
||||||
|
AudioTranscriptionPostProcessor,
|
||||||
|
)
|
||||||
from frigate.data_processing.post.license_plate import (
|
from frigate.data_processing.post.license_plate import (
|
||||||
LicensePlatePostProcessor,
|
LicensePlatePostProcessor,
|
||||||
)
|
)
|
||||||
@ -176,6 +179,18 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
audio_transcription_cameras = [
|
||||||
|
c
|
||||||
|
for c in self.config.cameras.values()
|
||||||
|
if c.enabled_in_config and c.audio_transcription.enabled
|
||||||
|
]
|
||||||
|
if audio_transcription_cameras:
|
||||||
|
self.post_processors.append(
|
||||||
|
AudioTranscriptionPostProcessor(
|
||||||
|
self.config, self.requestor, metrics, self.embeddings
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
self.stop_event = stop_event
|
self.stop_event = stop_event
|
||||||
self.tracked_events: dict[str, list[Any]] = {}
|
self.tracked_events: dict[str, list[Any]] = {}
|
||||||
self.early_request_sent: dict[str, bool] = {}
|
self.early_request_sent: dict[str, bool] = {}
|
||||||
@ -372,6 +387,8 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
},
|
},
|
||||||
PostProcessDataEnum.recording,
|
PostProcessDataEnum.recording,
|
||||||
)
|
)
|
||||||
|
elif isinstance(processor, AudioTranscriptionPostProcessor):
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
processor.process_data(event_id, PostProcessDataEnum.event_id)
|
processor.process_data(event_id, PostProcessDataEnum.event_id)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user