Skip to content

Commit

Permalink
volume filtering options in model
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesG-Speechmatics committed Mar 4, 2024
1 parent 61f0e66 commit 010c8f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions speechmatics/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ def get_transcription_config(
]:
config[option] = True if args.get(option) else config.get(option)

if args.get("volume_threshold"):
config["audio_filtering_config"] = {"volume_threshold": args.get("volume_threshold")}

if args.get("ctrl"):
LOGGER.warning(f"Using internal dev control command: {args['ctrl']}")
config["ctrl"] = json.loads(args["ctrl"])
Expand Down
3 changes: 3 additions & 0 deletions speechmatics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def asdict(self) -> Dict[Any, Any]:
enable_entities: bool = None
"""Indicates if inverse text normalization entity output is enabled."""

audio_filtering_config: dict = None
"""Configuration for limiting the transcription of quiet audio."""


@dataclass
class RTSpeakerDiarizationConfig:
Expand Down

0 comments on commit 010c8f8

Please sign in to comment.