mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
config validator and docs
This commit is contained in:
parent
8e56b132f1
commit
59a7c79b88
@ -75,14 +75,16 @@ audio:
|
||||
|
||||
### Audio Transcription
|
||||
|
||||
Frigate supports fully local text transcription using `sherpa-onnx` and OpenAI's fully local, open source Whisper models (using `faster-whisper`). Enable audio transcription features at the global level in your config:
|
||||
Frigate supports fully local text transcription using `sherpa-onnx` and OpenAI's fully local, open source Whisper models (using `faster-whisper`). Audio transcription can be enabled at the global level of your config, but since you likely will not want to use audio transcription for every camera, just set the config for audio transcription features at the global level:
|
||||
|
||||
```yaml
|
||||
audio_transcription:
|
||||
enabled: True
|
||||
enabled: False
|
||||
device: ...
|
||||
model_size: ...
|
||||
```
|
||||
|
||||
Audio transcription can also be enabled for select cameras only at the camera level:
|
||||
Then enable audio transcription for select cameras only at the camera level:
|
||||
|
||||
```yaml
|
||||
cameras:
|
||||
|
||||
@ -710,6 +710,21 @@ class FrigateConfig(FrigateBaseModel):
|
||||
self.model.create_colormap(sorted(self.objects.all_objects))
|
||||
self.model.check_and_load_plus_model(self.plus_api)
|
||||
|
||||
# Check audio transcription and audio detection requirements
|
||||
if self.audio_transcription.enabled:
|
||||
# If audio transcription is enabled globally, at least one camera must have audio detection enabled
|
||||
if not any(camera.audio.enabled for camera in self.cameras.values()):
|
||||
raise ValueError(
|
||||
"Audio transcription is enabled globally, but no cameras have audio detection enabled. At least one camera must have audio detection enabled."
|
||||
)
|
||||
else:
|
||||
# If audio transcription is disabled globally, check each camera with audio_transcription enabled
|
||||
for camera in self.cameras.values():
|
||||
if camera.audio_transcription.enabled and not camera.audio.enabled:
|
||||
raise ValueError(
|
||||
f"Camera {camera.name} has audio transcription enabled, but audio detection is not enabled for this camera. Audio detection must be enabled for cameras with audio transcription when it is disabled globally."
|
||||
)
|
||||
|
||||
if self.plus_api and not self.snapshots.clean_copy:
|
||||
logger.warning(
|
||||
"Frigate+ is configured but clean snapshots are not enabled, submissions to Frigate+ will not be possible./"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user