phonexia-enhanced-speech-to-text-built-on-whisper-client 2.0.0__py3-none-any.whl → 2.1.0__py3-none-any.whl
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-2.0.0.dist-info → phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info}/METADATA +2 -2
- phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/RECORD +6 -0
- phonexia_enhanced_speech_to_text_built_on_whisper_client.py +21 -6
- phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/RECORD +0 -6
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info → phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info}/WHEEL +0 -0
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info → phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info}/entry_points.txt +0 -0
- {phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info → phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: phonexia-enhanced-speech-to-text-built-on-whisper-client
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Audio Quality Estimation Client
|
|
5
5
|
Author-email: Phonexia <info@phonexia.com>
|
|
6
6
|
Keywords: grpc,transcription,STT,ASR,speech to text,speech,language,microservice
|
|
7
7
|
Requires-Python: >=3.9
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
Requires-Dist: more-itertools>=10.6.0
|
|
10
|
-
Requires-Dist: phonexia-grpc>=2.
|
|
10
|
+
Requires-Dist: phonexia-grpc>=2.27.1
|
|
11
11
|
Requires-Dist: numpy>=2.0.0; python_version >= "3.12"
|
|
12
12
|
Requires-Dist: numpy<2.0.0; python_version < "3.12"
|
|
13
13
|
Requires-Dist: typer>=0.16.0
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client.py,sha256=QgjKD-rr3x03ql813SEyWOgwU_mB-wdpveymIHiBJKc,17894
|
|
2
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/METADATA,sha256=DiPM5M5pECYfOQ6tFV664tf6eDP_txqTNIGGvQynrSk,1748
|
|
3
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/entry_points.txt,sha256=3t-DG5W0VDbM-4oqWylIKsJ5f-IDo8eJtvB8fpF9tOk,129
|
|
5
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/top_level.txt,sha256=UrRc-bXR5jArOtIsymBnXsH9Z1wEWmGu8hB0n1A32Q8,57
|
|
6
|
+
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.1.0.dist-info/RECORD,,
|
|
@@ -279,6 +279,23 @@ def _parse_metadata_callback(
|
|
|
279
279
|
app = typer.Typer(context_settings={"help_option_names": ["-h", "--help"]}, no_args_is_help=True)
|
|
280
280
|
|
|
281
281
|
|
|
282
|
+
def handle_grpc_error(e: grpc.RpcError):
|
|
283
|
+
err_msg = f"gRPC call failed with status code: {e.code()}\n\n"
|
|
284
|
+
|
|
285
|
+
if e.code() == grpc.StatusCode.UNAVAILABLE:
|
|
286
|
+
err_msg += "Service is unavailable at this address. (Hint use '--plaintext' option to connect to the service without TLS.)"
|
|
287
|
+
elif e.code() == grpc.StatusCode.RESOURCE_EXHAUSTED:
|
|
288
|
+
err_msg += "Service is busy. Please try again later."
|
|
289
|
+
elif e.code() == grpc.StatusCode.INVALID_ARGUMENT:
|
|
290
|
+
err_msg += f"Invalid arguments were provided to the RPC. Details: {e.details()}"
|
|
291
|
+
elif e.code() == grpc.StatusCode.DEADLINE_EXCEEDED:
|
|
292
|
+
err_msg += "The RPC deadline was exceeded."
|
|
293
|
+
else:
|
|
294
|
+
err_msg += f"An unexpected error occurred: {e.code()} - {e.details()}"
|
|
295
|
+
|
|
296
|
+
raise typer.BadParameter(err_msg)
|
|
297
|
+
|
|
298
|
+
|
|
282
299
|
@app.command()
|
|
283
300
|
def translate(
|
|
284
301
|
ctx: typer.Context,
|
|
@@ -368,9 +385,8 @@ def translate(
|
|
|
368
385
|
|
|
369
386
|
logging.debug(f"Elapsed time {(datetime.now() - start_time)}")
|
|
370
387
|
|
|
371
|
-
except grpc.RpcError:
|
|
372
|
-
|
|
373
|
-
raise typer.Exit(code=1) from None
|
|
388
|
+
except grpc.RpcError as e:
|
|
389
|
+
handle_grpc_error(e)
|
|
374
390
|
except (typer.Exit, typer.BadParameter):
|
|
375
391
|
raise
|
|
376
392
|
except Exception:
|
|
@@ -467,9 +483,8 @@ def transcribe(
|
|
|
467
483
|
|
|
468
484
|
logging.debug(f"Elapsed time {(datetime.now() - start_time)}")
|
|
469
485
|
|
|
470
|
-
except grpc.RpcError:
|
|
471
|
-
|
|
472
|
-
raise typer.Exit(code=1) from None
|
|
486
|
+
except grpc.RpcError as e:
|
|
487
|
+
handle_grpc_error(e)
|
|
473
488
|
except (typer.Exit, typer.BadParameter):
|
|
474
489
|
raise
|
|
475
490
|
except Exception:
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client.py,sha256=xkhDL3LCyMw0QuZL3-ZeVa9Fx2AxKjgVlOtsZvKqujE,17202
|
|
2
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/METADATA,sha256=isJHGgPYELCcAi1HYO0GGDsHE0veXaXs5KHRf43nXZU,1748
|
|
3
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/entry_points.txt,sha256=3t-DG5W0VDbM-4oqWylIKsJ5f-IDo8eJtvB8fpF9tOk,129
|
|
5
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/top_level.txt,sha256=UrRc-bXR5jArOtIsymBnXsH9Z1wEWmGu8hB0n1A32Q8,57
|
|
6
|
-
phonexia_enhanced_speech_to_text_built_on_whisper_client-2.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|