From 18446ea9bf6b3991469bb75cd7586ceb4757e322 Mon Sep 17 00:00:00 2001 From: Markus Hennerbichler Date: Wed, 28 Feb 2024 20:29:38 +0000 Subject: [PATCH] Fix missing audio_events_config in BatchTranscriptionConfig --- speechmatics/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/speechmatics/models.py b/speechmatics/models.py index 13079ab..82e386c 100644 --- a/speechmatics/models.py +++ b/speechmatics/models.py @@ -214,7 +214,6 @@ class AutoChaptersConfig: @dataclass class AudioEventsConfig: - types: Optional[List[str]] """Optional list of audio event types to detect.""" @@ -340,6 +339,7 @@ def as_config(self): sentiment_analysis_config = dictionary.pop("sentiment_analysis_config", None) topic_detection_config = dictionary.pop("topic_detection_config", None) auto_chapters_config = dictionary.pop("auto_chapters_config", None) + audio_events_config = dictionary.pop("audio_events_config", None) config = {"type": "transcription", "transcription_config": dictionary} if fetch_data: @@ -371,6 +371,9 @@ def as_config(self): if auto_chapters_config is not None: config["auto_chapters_config"] = auto_chapters_config + if audio_events_config is not None: + config["audio_events_config"] = audio_events_config + return json.dumps(config)