Skip to content

Commit

Permalink
Audio Events batch CLI parser
Browse files Browse the repository at this point in the history
  • Loading branch information
HennerM committed Mar 20, 2024
1 parent 1ad89e5 commit 445a91b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.14.5] - 2024-03-20

## Added

- Support for audio_events in Batch CLI.

## [1.14.4] - 2024-03-04

## Added
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.4
1.14.5
11 changes: 11 additions & 0 deletions speechmatics/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,16 @@ def get_arg_parser():
help="Enable audio event detection and print events in square-brackets to the console, e.g. [MUSIC]",
)

# Parent parser for batch auto-chapters argument
batch_audio_events_parser = argparse.ArgumentParser(add_help=False)
batch_audio_events_parser.add_argument(
"--audio-events",
dest="detect_chapters",
action="store_true",
help="Enable audio event detection, "
"will include `audio_events` and `audio_event_summary` keys in output (JSON only)",
)

# Build our actual parsers.
mode_subparsers = parser.add_subparsers(title="Mode", dest="mode")

Expand Down Expand Up @@ -514,6 +524,7 @@ def get_arg_parser():
batch_sentiment_analysis_parser,
batch_topic_detection_parser,
batch_auto_chapters_parser,
batch_audio_events_parser,
],
help="Transcribe one or more audio files using batch mode, while waiting for results.",
)
Expand Down

0 comments on commit 445a91b

Please sign in to comment.