mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-10 04:41:11 +03:00
allow toggling live audio transcription via mqtt
This commit is contained in:
@@ -256,7 +256,7 @@ The only field that is valid at the camera level is `enabled`.
|
|||||||
|
|
||||||
#### Live transcription
|
#### Live transcription
|
||||||
|
|
||||||
The single camera Live view in the Frigate UI supports live transcription of audio for streams defined with the `audio` role. Use the Enable/Disable Live Audio Transcription button/switch to toggle transcription processing. When speech is heard, the UI will display a black box over the top of the camera stream with text. The MQTT topic `frigate/<camera_name>/audio/transcription` will also be updated in real-time with transcribed text.
|
The single camera Live view in the Frigate UI supports live transcription of audio for streams defined with the `audio` role. Use the Enable/Disable Live Audio Transcription button/switch to toggle transcription processing, or toggle it outside of the UI with the [`frigate/<camera_name>/audio_transcription/set`](/integrations/mqtt#frigatecamera_nameaudio_transcriptionset) MQTT topic or the HTTP API. When speech is heard, the UI will display a black box over the top of the camera stream with text. The MQTT topic `frigate/<camera_name>/audio/transcription` will also be updated in real-time with transcribed text.
|
||||||
|
|
||||||
Results can be error-prone due to a number of factors, including:
|
Results can be error-prone due to a number of factors, including:
|
||||||
|
|
||||||
|
|||||||
@@ -390,6 +390,18 @@ Topic to turn audio detection for a camera on and off. Expected values are `ON`
|
|||||||
|
|
||||||
Topic with current state of audio detection for a camera. Published values are `ON` and `OFF`.
|
Topic with current state of audio detection for a camera. Published values are `ON` and `OFF`.
|
||||||
|
|
||||||
|
### `frigate/<camera_name>/audio_transcription/set`
|
||||||
|
|
||||||
|
Topic to turn [live audio transcription](/configuration/audio_detectors#live-transcription) for a camera on and off. Expected values are `ON` and `OFF`. Transcribed text is published to `frigate/<camera_name>/audio/transcription`.
|
||||||
|
|
||||||
|
`ON` is ignored unless audio transcription is enabled in the config for the camera. Unlike the other camera toggles, this one is not persisted across Frigate restarts.
|
||||||
|
|
||||||
|
**NOTE:** Requires audio detection and transcription to be enabled
|
||||||
|
|
||||||
|
### `frigate/<camera_name>/audio_transcription/state`
|
||||||
|
|
||||||
|
Topic with current state of live audio transcription for a camera. Published values are `ON` and `OFF`.
|
||||||
|
|
||||||
### `frigate/<camera_name>/recordings/set`
|
### `frigate/<camera_name>/recordings/set`
|
||||||
|
|
||||||
Topic to turn recordings for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).
|
Topic to turn recordings for a camera on and off. Expected values are `ON` and `OFF`. The change is persisted across Frigate restarts (see [Runtime toggle persistence](/configuration/live#runtime-toggle-persistence)).
|
||||||
|
|||||||
@@ -77,6 +77,11 @@ class MqttClient(Communicator):
|
|||||||
"ON" if camera.audio.enabled_in_config else "OFF",
|
"ON" if camera.audio.enabled_in_config else "OFF",
|
||||||
retain=True,
|
retain=True,
|
||||||
)
|
)
|
||||||
|
self.publish(
|
||||||
|
f"{camera_name}/audio_transcription/state",
|
||||||
|
"ON" if camera.audio_transcription.live_enabled else "OFF",
|
||||||
|
retain=True,
|
||||||
|
)
|
||||||
self.publish(
|
self.publish(
|
||||||
f"{camera_name}/detect/state",
|
f"{camera_name}/detect/state",
|
||||||
"ON" if camera.detect.enabled else "OFF",
|
"ON" if camera.detect.enabled else "OFF",
|
||||||
@@ -258,6 +263,7 @@ class MqttClient(Communicator):
|
|||||||
"snapshots",
|
"snapshots",
|
||||||
"detect",
|
"detect",
|
||||||
"audio",
|
"audio",
|
||||||
|
"audio_transcription",
|
||||||
"motion",
|
"motion",
|
||||||
"improve_contrast",
|
"improve_contrast",
|
||||||
"ptz_autotracker",
|
"ptz_autotracker",
|
||||||
|
|||||||
Reference in New Issue
Block a user