WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 53f82a3

Browse files
committed
Add deprecation warning
1 parent 9a2795a commit 53f82a3

File tree

6 files changed

+43
-16
lines changed

6 files changed

+43
-16
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
# speechmatics-python   ![Tests](https://github.com/speechmatics/speechmatics-python/workflows/Tests/badge.svg) [![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/speechmatics/speechmatics-python/blob/master/LICENSE.txt) ![PythonSupport](https://img.shields.io/badge/Python-3.7%2B-green)
1+
# Legacy Speechmatics Python Client
22

3-
Python client library and CLI for Speechmatics Realtime and Batch ASR v2 APIs.
3+
> **⚠️ WARNING: This package (`speechmatics-python`) has been deprecated.**
4+
>
5+
> - **No new features** will be added
6+
> - **Bug fixes and security patches only** until **2025-12-31**
7+
>
8+
9+
### Migration Path
10+
11+
**New Official SDKs** (at [speechmatics-python-sdk](https://github.com/speechmatics/speechmatics-python-sdk)):
412

13+
| Old Package | New Package | Purpose | Migration Guide |
14+
|-------------|-------------|---------|-----------------|
15+
| `speechmatics-python` | [`speechmatics-batch`](https://pypi.org/project/speechmatics-batch) | Batch transcription | [📖 Batch Migration Guide](https://github.com/speechmatics/speechmatics-python-sdk/blob/main/sdk/batch/MIGRATION.md) |
16+
| `speechmatics-python` | [`speechmatics-rt`](https://pypi.org/project/speechmatics-rt) | Real-time transcription | [📖 RT Migration Guide](https://github.com/speechmatics/speechmatics-python-sdk/blob/main/sdk/rt/MIGRATION.md) |
17+
| `speechmatics.cli` | Not available (will be released as a separate package) | | |
18+
19+
Python client library and CLI for Speechmatics Realtime and Batch ASR v2 APIs.
520

621
## Getting started
722

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.4
1+
4.0.5

asr_metrics/wer/normalizers/basic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def remove_symbols_and_diacritics(self, s: str, keep=""):
5959
else (
6060
""
6161
if unicodedata.category(c) == "Mn"
62-
else " " if unicodedata.category(c)[0] in "MSP" else c
62+
else " "
63+
if unicodedata.category(c)[0] in "MSP"
64+
else c
6365
)
6466
)
6567
)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def get_version(fname):
8585
classifiers=[
8686
"Environment :: Console",
8787
"Intended Audience :: Developers",
88+
"Development Status :: 7 - Inactive",
8889
"License :: OSI Approved :: MIT License",
8990
"Operating System :: OS Independent",
9091
"Programming Language :: Python :: 3",

speechmatics/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
import warnings
2+
13
from speechmatics.client import * # noqa
24
from speechmatics.exceptions import * # noqa
35
from speechmatics.models import * # noqa
6+
7+
warnings.warn(
8+
"DEPRECATION: speechmatics-python is deprecated."
9+
"Please migrate to 'speechmatics-rt' for real-time or 'speechmatics-batch' for batch transcription.",
10+
DeprecationWarning,
11+
stacklevel=2,
12+
)

speechmatics/client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ def _set_recognition_config(self):
150150
"transcription_config": self.transcription_config.as_config(),
151151
}
152152
if self.transcription_config.translation_config is not None:
153-
msg["translation_config"] = (
154-
self.transcription_config.translation_config.asdict()
155-
)
153+
msg[
154+
"translation_config"
155+
] = self.transcription_config.translation_config.asdict()
156156
if self.transcription_config.audio_events_config is not None:
157-
msg["audio_events_config"] = (
158-
self.transcription_config.audio_events_config.asdict()
159-
)
157+
msg[
158+
"audio_events_config"
159+
] = self.transcription_config.audio_events_config.asdict()
160160
self._call_middleware(ClientMessageType.SetRecognitionConfig, msg, False)
161161
return msg
162162

@@ -179,13 +179,13 @@ def _start_recognition(self, audio_settings):
179179
}
180180

181181
if self.transcription_config.translation_config is not None:
182-
msg["translation_config"] = (
183-
self.transcription_config.translation_config.asdict()
184-
)
182+
msg[
183+
"translation_config"
184+
] = self.transcription_config.translation_config.asdict()
185185
if self.transcription_config.audio_events_config is not None:
186-
msg["audio_events_config"] = (
187-
self.transcription_config.audio_events_config.asdict()
188-
)
186+
msg[
187+
"audio_events_config"
188+
] = self.transcription_config.audio_events_config.asdict()
189189
self.session_running = True
190190
self._call_middleware(ClientMessageType.StartRecognition, msg, False)
191191
LOGGER.debug(msg)

0 commit comments

Comments
 (0)