Skip to content

Commit

Permalink
Remove deprecated speaker_change, channel_and_speaker_change, and spe…
Browse files Browse the repository at this point in the history
…aker_change_sensitivity diarization options
  • Loading branch information
dumitrugutu committed Aug 1, 2024
1 parent 076618a commit 820c71a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
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).

## [2.0.0] - 2024-08-01

### Changed

- Remove deprecated speaker_change, channel_and_speaker_change, and speaker_change_sensitivity diarization options

## [1.15.0] - 2024-07-31

## Added
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.0
2.0.0
1 change: 0 additions & 1 deletion speechmatics/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def get_transcription_config(
"max_delay_mode",
"diarization",
"channel_diarization_labels",
"speaker_change_sensitivity",
"speaker_diarization_sensitivity",
]:
if args.get(option) is not None:
Expand Down
4 changes: 2 additions & 2 deletions speechmatics/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def get_arg_parser():
)
batch_diarization_parser.add_argument(
"--diarization",
choices=["none", "speaker", "channel", "channel_and_speaker_change"],
choices=["none", "speaker", "channel"],
help="Which type of diarization to use.",
)
batch_diarization_parser.add_argument(
Expand Down Expand Up @@ -496,7 +496,7 @@ def get_arg_parser():

rt_transcribe_command_parser.add_argument(
"--diarization",
choices=["none", "speaker", "speaker_change"],
choices=["none", "speaker"],
help="Which type of diarization to use.",
)

Expand Down
3 changes: 0 additions & 3 deletions speechmatics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,6 @@ class TranscriptionConfig(_TranscriptionConfig):
speaker_diarization_config: RTSpeakerDiarizationConfig = None
"""Configuration for speaker diarization."""

speaker_change_sensitivity: float = None
"""Sensitivity level for speaker change."""

streaming_mode: bool = None
"""Indicates if we run the engine in streaming mode, or regular RT mode."""

Expand Down
18 changes: 0 additions & 18 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,6 @@
"channel_diarization_labels": ["label5 label4 label3"],
},
),
(
[
"batch",
"transcribe",
"--diarization=channel_and_speaker_change",
"--channel-diarization-labels=label1 label2",
],
{
"diarization": "channel_and_speaker_change",
"channel_diarization_labels": ["label1 label2"],
},
),
(["rt", "transcribe", "--auth-token=xyz"], {"auth_token": "xyz"}),
(
["batch", "transcribe", "--domain=finance"],
Expand All @@ -208,10 +196,6 @@
["batch", "transcribe", "--output-format=json-v2"],
{"output_format": "json-v2"},
),
(
["batch", "transcribe", "--diarization=channel_and_speaker_change"],
{"diarization": "channel_and_speaker_change"},
),
(["batch", "submit"], {"command": "submit"}),
(
["rt", "transcribe", "--config-file=data/transcription_config.json"],
Expand Down Expand Up @@ -678,7 +662,6 @@ def test_rt_main_with_all_options(mock_server, tmp_path):
assert msg["transcription_config"]["diarization"] == "none"
assert msg["transcription_config"]["max_delay"] == 5.0
assert msg["transcription_config"]["max_delay_mode"] == "fixed"
assert msg["transcription_config"]["speaker_change_sensitivity"] == 0.8
assert msg["transcription_config"].get("operating_point") is None
assert (
msg["transcription_config"]["transcript_filtering_config"][
Expand Down Expand Up @@ -773,7 +756,6 @@ def test_rt_main_with_config_file_cmdline_override(mock_server):
assert msg["transcription_config"]["domain"] == "different"
assert msg["transcription_config"]["enable_entities"] is True
assert msg["transcription_config"]["output_locale"] == "en-US"
assert msg["transcription_config"]["speaker_change_sensitivity"] == 0.8
assert msg["transcription_config"]["operating_point"] == "enhanced"
assert msg["translation_config"] is not None
assert msg["translation_config"]["enable_partials"] is True
Expand Down

0 comments on commit 820c71a

Please sign in to comment.