phonexia-enhanced-speech-to-text-built-on-whisper-client 1.7.0__tar.gz → 1.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-1.7.0 → phonexia_enhanced_speech_to_text_built_on_whisper_client-1.8.0}/PKG-INFO +7 -6
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-1.7.0 → phonexia_enhanced_speech_to_text_built_on_whisper_client-1.8.0}/phonexia_enhanced_speech_to_text_built_on_whisper_client.py +17 -2
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-1.7.0 → phonexia_enhanced_speech_to_text_built_on_whisper_client-1.8.0}/pypi-README.md +2 -2
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-1.7.0 → phonexia_enhanced_speech_to_text_built_on_whisper_client-1.8.0}/pyproject.toml +6 -5
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: phonexia-enhanced-speech-to-text-built-on-whisper-client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.0
|
|
4
4
|
Summary: Client for communication with Phonexia Enhanced Speech To Text Built On Whisper microservice.
|
|
5
5
|
Keywords: grpc,transcription,STT,ASR,speech to text,speech,language,microservice
|
|
6
6
|
Author: Phonexia
|
|
7
7
|
Author-email: info@phonexia.com
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
11
10
|
Classifier: Programming Language :: Python :: 3.9
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Dist: grpcio (>=1.54.0,<2.0.0)
|
|
16
16
|
Requires-Dist: numpy (<2.0.0) ; python_version < "3.12"
|
|
17
17
|
Requires-Dist: numpy (>=2.0.0) ; python_version >= "3.12"
|
|
18
18
|
Requires-Dist: phonexia-grpc (>=2.0.0,<3.0.0)
|
|
19
|
+
Requires-Dist: protobuf (>=5.0.0,<6.0.0)
|
|
19
20
|
Requires-Dist: soundfile (>=0.12.1,<0.13.0)
|
|
20
21
|
Project-URL: Homepage, https://phonexia.com
|
|
21
22
|
Project-URL: Issues, https://phonexia.atlassian.net/servicedesk/customer/portal/15/group/20/create/40
|
|
@@ -31,6 +32,6 @@ This module contains client for communication with [enhanced speech to text buil
|
|
|
31
32
|
|
|
32
33
|
To use this client you will first need a running instance of any *Phonexia enhanced speech to text built on whisper microservice*. If you don't yet have any running instance, don't hesitate to [contact our sales department](mailto:info@phonexia.com).
|
|
33
34
|
|
|
34
|
-
You can learn more about the enhanced speech to text built on whisper technology [here](https://docs.
|
|
35
|
+
You can learn more about the enhanced speech to text built on whisper technology [here](https://docs.phonexia.com/products/speech-platform-4/technologies/speech-to-text/enhanced-speech-to-text-built-on-whisper).
|
|
35
36
|
|
|
36
|
-
On [this page](https://docs.
|
|
37
|
+
On [this page](https://docs.phonexia.com/products/speech-platform-4/grpc/api/phonexia/grpc/technologies/enhanced_speech_to_text_built_on_whisper/v1/enhanced_speech_to_text_built_on_whisper.proto), you will find a *gRPC API* reference for *enhanced speech to text built on whisper microservice*.
|
|
@@ -45,11 +45,14 @@ def transcribe_request_iterator(
|
|
|
45
45
|
start: Optional[float],
|
|
46
46
|
end: Optional[float],
|
|
47
47
|
enable_language_switching: bool = False,
|
|
48
|
+
enable_word_segmentation: bool = False,
|
|
48
49
|
use_raw_audio: bool = False,
|
|
49
50
|
) -> Iterator[TranscribeRequest]:
|
|
50
51
|
time_range = TimeRange(start=time_to_duration(start), end=time_to_duration(end))
|
|
51
52
|
config = TranscribeConfig(
|
|
52
|
-
language=specified_language,
|
|
53
|
+
language=specified_language,
|
|
54
|
+
enable_language_switching=enable_language_switching,
|
|
55
|
+
enable_word_segmentation=enable_word_segmentation,
|
|
53
56
|
)
|
|
54
57
|
|
|
55
58
|
if use_raw_audio:
|
|
@@ -89,10 +92,13 @@ def translate_request_iterator(
|
|
|
89
92
|
start: Optional[float],
|
|
90
93
|
end: Optional[float],
|
|
91
94
|
enable_language_switching: bool = False,
|
|
95
|
+
enable_word_segmentation: bool = False,
|
|
92
96
|
) -> Iterator[TranslateRequest]:
|
|
93
97
|
time_range = TimeRange(start=time_to_duration(start), end=time_to_duration(end))
|
|
94
98
|
config = TranslateConfig(
|
|
95
|
-
source_language=specified_language,
|
|
99
|
+
source_language=specified_language,
|
|
100
|
+
enable_language_switching=enable_language_switching,
|
|
101
|
+
enable_word_segmentation=enable_word_segmentation,
|
|
96
102
|
)
|
|
97
103
|
|
|
98
104
|
with open(file, "rb") as f:
|
|
@@ -111,6 +117,7 @@ def transcribe(
|
|
|
111
117
|
metadata: Optional[list],
|
|
112
118
|
task: Task,
|
|
113
119
|
enable_language_switching: bool = False,
|
|
120
|
+
enable_word_segmentation: bool = False,
|
|
114
121
|
use_raw_audio: bool = False,
|
|
115
122
|
):
|
|
116
123
|
stub = stt_grpc.SpeechToTextStub(channel)
|
|
@@ -122,6 +129,7 @@ def transcribe(
|
|
|
122
129
|
start=start,
|
|
123
130
|
end=end,
|
|
124
131
|
enable_language_switching=enable_language_switching,
|
|
132
|
+
enable_word_segmentation=enable_word_segmentation,
|
|
125
133
|
use_raw_audio=use_raw_audio,
|
|
126
134
|
),
|
|
127
135
|
metadata=metadata,
|
|
@@ -134,6 +142,7 @@ def transcribe(
|
|
|
134
142
|
start=start,
|
|
135
143
|
end=end,
|
|
136
144
|
enable_language_switching=enable_language_switching,
|
|
145
|
+
enable_word_segmentation=enable_word_segmentation,
|
|
137
146
|
),
|
|
138
147
|
metadata=metadata,
|
|
139
148
|
)
|
|
@@ -222,6 +231,11 @@ def main():
|
|
|
222
231
|
action="store_true",
|
|
223
232
|
help="Enable dynamic language switching during transcription, with the language being detected approximately every 30 seconds",
|
|
224
233
|
)
|
|
234
|
+
parser.add_argument(
|
|
235
|
+
"--enable-word-segmentation",
|
|
236
|
+
action="store_true",
|
|
237
|
+
help="Enable word-level transcription. Note: Enabling this option may increase processing time",
|
|
238
|
+
)
|
|
225
239
|
parser.add_argument("file", type=str, help="Path to input file")
|
|
226
240
|
parser.add_argument("--use_raw_audio", action="store_true", help="Send a raw audio in")
|
|
227
241
|
|
|
@@ -265,6 +279,7 @@ def main():
|
|
|
265
279
|
metadata=args.metadata,
|
|
266
280
|
task=args.task,
|
|
267
281
|
enable_language_switching=args.enable_language_switching,
|
|
282
|
+
enable_word_segmentation=args.enable_word_segmentation,
|
|
268
283
|
use_raw_audio=args.use_raw_audio,
|
|
269
284
|
)
|
|
270
285
|
|
|
@@ -7,6 +7,6 @@ This module contains client for communication with [enhanced speech to text buil
|
|
|
7
7
|
|
|
8
8
|
To use this client you will first need a running instance of any *Phonexia enhanced speech to text built on whisper microservice*. If you don't yet have any running instance, don't hesitate to [contact our sales department](mailto:info@phonexia.com).
|
|
9
9
|
|
|
10
|
-
You can learn more about the enhanced speech to text built on whisper technology [here](https://docs.
|
|
10
|
+
You can learn more about the enhanced speech to text built on whisper technology [here](https://docs.phonexia.com/products/speech-platform-4/technologies/speech-to-text/enhanced-speech-to-text-built-on-whisper).
|
|
11
11
|
|
|
12
|
-
On [this page](https://docs.
|
|
12
|
+
On [this page](https://docs.phonexia.com/products/speech-platform-4/grpc/api/phonexia/grpc/technologies/enhanced_speech_to_text_built_on_whisper/v1/enhanced_speech_to_text_built_on_whisper.proto), you will find a *gRPC API* reference for *enhanced speech to text built on whisper microservice*.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "phonexia-enhanced-speech-to-text-built-on-whisper-client"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.8.0"
|
|
4
4
|
description = "Client for communication with Phonexia Enhanced Speech To Text Built On Whisper microservice."
|
|
5
5
|
readme = "pypi-README.md"
|
|
6
6
|
keywords = ["grpc", "transcription", "STT", "ASR", "speech to text", "speech", "language", "microservice"]
|
|
@@ -15,8 +15,9 @@ protofiles = "https://github.com/phonexia/protofiles"
|
|
|
15
15
|
enhanced_speech_to_text_built_on_whisper_client = 'phonexia_enhanced_speech_to_text_built_on_whisper_client:main'
|
|
16
16
|
|
|
17
17
|
[tool.poetry.dependencies]
|
|
18
|
-
python = ">=3.
|
|
18
|
+
python = ">=3.9,<4.0"
|
|
19
19
|
grpcio = "^1.54.0"
|
|
20
|
+
protobuf = "^5.0.0"
|
|
20
21
|
phonexia-grpc = {version="^2.0.0", source="pypi"}
|
|
21
22
|
soundfile = "^0.12.1"
|
|
22
23
|
numpy = [
|
|
@@ -30,7 +31,7 @@ pytest-cov = "^5.0.0"
|
|
|
30
31
|
pytest-env = "^1.0.0"
|
|
31
32
|
pytest-random-order = "^1.1.0"
|
|
32
33
|
black = "^24.0.0"
|
|
33
|
-
ruff = "^0.
|
|
34
|
+
ruff = "^0.8.0"
|
|
34
35
|
|
|
35
36
|
[[tool.poetry.source]]
|
|
36
37
|
name = "PyPI"
|
|
@@ -46,11 +47,11 @@ build-backend = "poetry.core.masonry.api"
|
|
|
46
47
|
|
|
47
48
|
[tool.black]
|
|
48
49
|
line-length = 100
|
|
49
|
-
target-version = ['
|
|
50
|
+
target-version = ['py39']
|
|
50
51
|
preview = true
|
|
51
52
|
|
|
52
53
|
[tool.ruff]
|
|
53
|
-
target-version = "
|
|
54
|
+
target-version = "py39"
|
|
54
55
|
line-length = 100
|
|
55
56
|
fix = true
|
|
56
57
|
lint.select = [
|