Skip to content

Commit

Permalink
Fix missing audio_events_config in BatchTranscriptionConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
HennerM committed Feb 28, 2024
1 parent 759caf5 commit 18446ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion speechmatics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class AutoChaptersConfig:

@dataclass
class AudioEventsConfig:

types: Optional[List[str]]
"""Optional list of audio event types to detect."""

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 18446ea

Please sign in to comment.