mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-16 12:02:09 +03:00
Merge branch 'dev' of https://github.com/DeGirum/frigate into dev
This commit is contained in:
commit
eb9d4b5f00
@ -163,6 +163,32 @@ class CameraSemanticSearchConfig(FrigateBaseModel):
|
|||||||
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class TriggerConfig(FrigateBaseModel):
|
||||||
|
enabled: bool = Field(default=True, title="Enable this trigger")
|
||||||
|
type: TriggerType = Field(default=TriggerType.DESCRIPTION, title="Type of trigger")
|
||||||
|
data: str = Field(title="Trigger content (text phrase or image ID)")
|
||||||
|
threshold: float = Field(
|
||||||
|
title="Confidence score required to run the trigger",
|
||||||
|
default=0.8,
|
||||||
|
gt=0.0,
|
||||||
|
le=1.0,
|
||||||
|
)
|
||||||
|
actions: List[TriggerAction] = Field(
|
||||||
|
default=[], title="Actions to perform when trigger is matched"
|
||||||
|
)
|
||||||
|
|
||||||
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class CameraSemanticSearchConfig(FrigateBaseModel):
|
||||||
|
triggers: Dict[str, TriggerConfig] = Field(
|
||||||
|
default={},
|
||||||
|
title="Trigger actions on tracked objects that match existing thumbnails or descriptions",
|
||||||
|
)
|
||||||
|
|
||||||
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class FaceRecognitionConfig(FrigateBaseModel):
|
class FaceRecognitionConfig(FrigateBaseModel):
|
||||||
enabled: bool = Field(default=False, title="Enable face recognition.")
|
enabled: bool = Field(default=False, title="Enable face recognition.")
|
||||||
model_size: str = Field(
|
model_size: str = Field(
|
||||||
|
|||||||
@ -180,6 +180,24 @@ class AudioEventMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
self.detection_publisher = DetectionPublisher(DetectionTypeEnum.audio.value)
|
self.detection_publisher = DetectionPublisher(DetectionTypeEnum.audio.value)
|
||||||
|
|
||||||
|
if self.camera_config.audio_transcription.enabled_in_config:
|
||||||
|
# init the transcription processor for this camera
|
||||||
|
self.transcription_processor = AudioTranscriptionRealTimeProcessor(
|
||||||
|
config=self.config,
|
||||||
|
camera_config=self.camera_config,
|
||||||
|
requestor=self.requestor,
|
||||||
|
model_runner=self.audio_transcription_model_runner,
|
||||||
|
metrics=self.camera_metrics[self.camera_config.name],
|
||||||
|
stop_event=self.stop_event,
|
||||||
|
)
|
||||||
|
|
||||||
|
self.transcription_thread = threading.Thread(
|
||||||
|
target=self.transcription_processor.run,
|
||||||
|
name=f"{self.camera_config.name}_transcription_processor",
|
||||||
|
daemon=True,
|
||||||
|
)
|
||||||
|
self.transcription_thread.start()
|
||||||
|
|
||||||
if self.camera_config.audio_transcription.enabled_in_config:
|
if self.camera_config.audio_transcription.enabled_in_config:
|
||||||
# init the transcription processor for this camera
|
# init the transcription processor for this camera
|
||||||
self.transcription_processor = AudioTranscriptionRealTimeProcessor(
|
self.transcription_processor = AudioTranscriptionRealTimeProcessor(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user