Skip to content

Commit

Permalink
Added speaker change deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dumitrugutu committed Jul 31, 2024
1 parent e3d35d8 commit 889b855
Show file tree
Hide file tree
Showing 4 changed files with 19 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.15.0] - 2024-07-31

## Added

- Speaker change deprecation warning

## [1.14.10] - 2024-06-21

## Fixed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.10
1.15.0
6 changes: 6 additions & 0 deletions speechmatics/batch_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ def submit_job(
a filepath as a string or Path object, or a dict"""
)

if config_dict.get("transcription_config", {}).get("diarization") == "channel_and_speaker_change":
LOGGER.warning(
"DeprecationWarning: Speaker Change Detection has been deprecated "
"and will not be supported in future versions of this package."
)

# If audio=None, fetch_data must be specified
file_object = None
try:
Expand Down
6 changes: 6 additions & 0 deletions speechmatics/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ async def run(
:raises Exception: Can raise any exception returned by the
consumer/producer tasks.
"""
if transcription_config.speaker_change_sensitivity or transcription_config.diarization == "speaker_change":
LOGGER.warning(
"DeprecationWarning: Speaker Change Detection has been deprecated "
"and will not be supported in future versions of this package."
)

self.transcription_config = transcription_config
self.seq_no = 0
self._language_pack_info = None
Expand Down

0 comments on commit 889b855

Please sign in to comment.