sarvamai 0.1.20a3__py3-none-any.whl → 0.1.22__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.
- sarvamai/core/client_wrapper.py +2 -2
- sarvamai/speech_to_text_job/job.py +100 -2
- sarvamai/speech_to_text_job/raw_client.py +14 -10
- sarvamai/speech_to_text_streaming/client.py +10 -2
- sarvamai/speech_to_text_streaming/raw_client.py +10 -2
- sarvamai/speech_to_text_translate_job/job.py +100 -2
- sarvamai/speech_to_text_translate_job/raw_client.py +14 -10
- sarvamai/speech_to_text_translate_streaming/client.py +10 -2
- sarvamai/speech_to_text_translate_streaming/raw_client.py +10 -2
- sarvamai/text_to_speech_streaming/client.py +10 -4
- sarvamai/text_to_speech_streaming/raw_client.py +10 -4
- {sarvamai-0.1.20a3.dist-info → sarvamai-0.1.22.dist-info}/METADATA +1 -1
- {sarvamai-0.1.20a3.dist-info → sarvamai-0.1.22.dist-info}/RECORD +14 -14
- {sarvamai-0.1.20a3.dist-info → sarvamai-0.1.22.dist-info}/WHEEL +0 -0
sarvamai/core/client_wrapper.py
CHANGED
|
@@ -23,10 +23,10 @@ class BaseClientWrapper:
|
|
|
23
23
|
|
|
24
24
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
25
25
|
headers: typing.Dict[str, str] = {
|
|
26
|
-
"User-Agent": "sarvamai/0.1.
|
|
26
|
+
"User-Agent": "sarvamai/0.1.22",
|
|
27
27
|
"X-Fern-Language": "Python",
|
|
28
28
|
"X-Fern-SDK-Name": "sarvamai",
|
|
29
|
-
"X-Fern-SDK-Version": "0.1.
|
|
29
|
+
"X-Fern-SDK-Version": "0.1.22",
|
|
30
30
|
**(self.get_custom_headers() or {}),
|
|
31
31
|
}
|
|
32
32
|
headers["api-subscription-key"] = self.api_subscription_key
|
|
@@ -146,9 +146,58 @@ class AsyncSpeechToTextJob:
|
|
|
146
146
|
"output_file": detail.outputs[0].file_name,
|
|
147
147
|
}
|
|
148
148
|
for detail in (job_status.job_details or [])
|
|
149
|
-
if detail.inputs and detail.outputs
|
|
149
|
+
if detail.inputs and detail.outputs and detail.state == "Success"
|
|
150
150
|
]
|
|
151
151
|
|
|
152
|
+
async def get_file_results(
|
|
153
|
+
self,
|
|
154
|
+
) -> typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]]:
|
|
155
|
+
"""
|
|
156
|
+
Get detailed results for each file in the batch job.
|
|
157
|
+
|
|
158
|
+
Returns
|
|
159
|
+
-------
|
|
160
|
+
Dict[str, List[Dict[str, Any]]]
|
|
161
|
+
Dictionary with 'successful' and 'failed' keys, each containing a list of file details.
|
|
162
|
+
Each file detail includes:
|
|
163
|
+
- 'file_name': Name of the input file
|
|
164
|
+
- 'status': Status of processing ('Success' or 'Failed')
|
|
165
|
+
- 'error_message': Error message if failed (None if successful)
|
|
166
|
+
- 'output_file': Name of output file if successful (None if failed)
|
|
167
|
+
"""
|
|
168
|
+
job_status = await self.get_status()
|
|
169
|
+
results: typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]] = {
|
|
170
|
+
"successful": [],
|
|
171
|
+
"failed": [],
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
for detail in job_status.job_details or []:
|
|
175
|
+
# Check for empty lists explicitly
|
|
176
|
+
if not detail.inputs or len(detail.inputs) == 0:
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
try:
|
|
180
|
+
file_info = {
|
|
181
|
+
"file_name": detail.inputs[0].file_name,
|
|
182
|
+
"status": detail.state,
|
|
183
|
+
"error_message": detail.error_message,
|
|
184
|
+
"output_file": (
|
|
185
|
+
detail.outputs[0].file_name
|
|
186
|
+
if detail.outputs and len(detail.outputs) > 0
|
|
187
|
+
else None
|
|
188
|
+
),
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if detail.state == "Success":
|
|
192
|
+
results["successful"].append(file_info)
|
|
193
|
+
else:
|
|
194
|
+
results["failed"].append(file_info)
|
|
195
|
+
except (IndexError, AttributeError):
|
|
196
|
+
# Skip malformed job details
|
|
197
|
+
continue
|
|
198
|
+
|
|
199
|
+
return results
|
|
200
|
+
|
|
152
201
|
async def download_outputs(self, output_dir: str) -> bool:
|
|
153
202
|
"""
|
|
154
203
|
Download output files to the specified directory.
|
|
@@ -387,9 +436,58 @@ class SpeechToTextJob:
|
|
|
387
436
|
"output_file": detail.outputs[0].file_name,
|
|
388
437
|
}
|
|
389
438
|
for detail in (job_status.job_details or [])
|
|
390
|
-
if detail.inputs and detail.outputs
|
|
439
|
+
if detail.inputs and detail.outputs and detail.state == "Success"
|
|
391
440
|
]
|
|
392
441
|
|
|
442
|
+
def get_file_results(
|
|
443
|
+
self,
|
|
444
|
+
) -> typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]]:
|
|
445
|
+
"""
|
|
446
|
+
Get detailed results for each file in the batch job.
|
|
447
|
+
|
|
448
|
+
Returns
|
|
449
|
+
-------
|
|
450
|
+
Dict[str, List[Dict[str, Any]]]
|
|
451
|
+
Dictionary with 'successful' and 'failed' keys, each containing a list of file details.
|
|
452
|
+
Each file detail includes:
|
|
453
|
+
- 'file_name': Name of the input file
|
|
454
|
+
- 'status': Status of processing ('Success' or 'Failed')
|
|
455
|
+
- 'error_message': Error message if failed (None if successful)
|
|
456
|
+
- 'output_file': Name of output file if successful (None if failed)
|
|
457
|
+
"""
|
|
458
|
+
job_status = self.get_status()
|
|
459
|
+
results: typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]] = {
|
|
460
|
+
"successful": [],
|
|
461
|
+
"failed": [],
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
for detail in job_status.job_details or []:
|
|
465
|
+
# Check for empty lists explicitly
|
|
466
|
+
if not detail.inputs or len(detail.inputs) == 0:
|
|
467
|
+
continue
|
|
468
|
+
|
|
469
|
+
try:
|
|
470
|
+
file_info = {
|
|
471
|
+
"file_name": detail.inputs[0].file_name,
|
|
472
|
+
"status": detail.state,
|
|
473
|
+
"error_message": detail.error_message,
|
|
474
|
+
"output_file": (
|
|
475
|
+
detail.outputs[0].file_name
|
|
476
|
+
if detail.outputs and len(detail.outputs) > 0
|
|
477
|
+
else None
|
|
478
|
+
),
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if detail.state == "Success":
|
|
482
|
+
results["successful"].append(file_info)
|
|
483
|
+
else:
|
|
484
|
+
results["failed"].append(file_info)
|
|
485
|
+
except (IndexError, AttributeError):
|
|
486
|
+
# Skip malformed job details
|
|
487
|
+
continue
|
|
488
|
+
|
|
489
|
+
return results
|
|
490
|
+
|
|
393
491
|
def download_outputs(self, output_dir: str) -> bool:
|
|
394
492
|
"""
|
|
395
493
|
Download output files to the specified directory.
|
|
@@ -39,7 +39,7 @@ class RawSpeechToTextJobClient:
|
|
|
39
39
|
request_options: typing.Optional[RequestOptions] = None,
|
|
40
40
|
) -> HttpResponse[BulkJobInitResponseV1]:
|
|
41
41
|
"""
|
|
42
|
-
|
|
42
|
+
Create a new speech to text bulk job and receive a job UUID and storage folder details for processing multiple audio files
|
|
43
43
|
|
|
44
44
|
Parameters
|
|
45
45
|
----------
|
|
@@ -160,7 +160,9 @@ class RawSpeechToTextJobClient:
|
|
|
160
160
|
self, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
161
161
|
) -> HttpResponse[JobStatusV1Response]:
|
|
162
162
|
"""
|
|
163
|
-
|
|
163
|
+
Retrieve the current status and details of a speech to text bulk job, including progress and file-level information.
|
|
164
|
+
|
|
165
|
+
**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
|
|
164
166
|
|
|
165
167
|
Parameters
|
|
166
168
|
----------
|
|
@@ -270,7 +272,7 @@ class RawSpeechToTextJobClient:
|
|
|
270
272
|
request_options: typing.Optional[RequestOptions] = None,
|
|
271
273
|
) -> HttpResponse[JobStatusV1Response]:
|
|
272
274
|
"""
|
|
273
|
-
Start a speech to text bulk job
|
|
275
|
+
Start processing a speech to text bulk job after all audio files have been uploaded
|
|
274
276
|
|
|
275
277
|
Parameters
|
|
276
278
|
----------
|
|
@@ -381,7 +383,7 @@ class RawSpeechToTextJobClient:
|
|
|
381
383
|
self, *, job_id: str, files: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
|
|
382
384
|
) -> HttpResponse[FilesUploadResponse]:
|
|
383
385
|
"""
|
|
384
|
-
|
|
386
|
+
Generate presigned upload URLs for audio files that will be processed in a speech to text bulk job
|
|
385
387
|
|
|
386
388
|
Parameters
|
|
387
389
|
----------
|
|
@@ -496,7 +498,7 @@ class RawSpeechToTextJobClient:
|
|
|
496
498
|
self, *, job_id: str, files: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
|
|
497
499
|
) -> HttpResponse[FilesDownloadResponse]:
|
|
498
500
|
"""
|
|
499
|
-
|
|
501
|
+
Generate presigned download URLs for the transcription output files of a completed speech to text bulk job
|
|
500
502
|
|
|
501
503
|
Parameters
|
|
502
504
|
----------
|
|
@@ -620,7 +622,7 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
620
622
|
request_options: typing.Optional[RequestOptions] = None,
|
|
621
623
|
) -> AsyncHttpResponse[BulkJobInitResponseV1]:
|
|
622
624
|
"""
|
|
623
|
-
|
|
625
|
+
Create a new speech to text bulk job and receive a job UUID and storage folder details for processing multiple audio files
|
|
624
626
|
|
|
625
627
|
Parameters
|
|
626
628
|
----------
|
|
@@ -741,7 +743,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
741
743
|
self, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
742
744
|
) -> AsyncHttpResponse[JobStatusV1Response]:
|
|
743
745
|
"""
|
|
744
|
-
|
|
746
|
+
Retrieve the current status and details of a speech to text bulk job, including progress and file-level information.
|
|
747
|
+
|
|
748
|
+
**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
|
|
745
749
|
|
|
746
750
|
Parameters
|
|
747
751
|
----------
|
|
@@ -851,7 +855,7 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
851
855
|
request_options: typing.Optional[RequestOptions] = None,
|
|
852
856
|
) -> AsyncHttpResponse[JobStatusV1Response]:
|
|
853
857
|
"""
|
|
854
|
-
Start a speech to text bulk job
|
|
858
|
+
Start processing a speech to text bulk job after all audio files have been uploaded
|
|
855
859
|
|
|
856
860
|
Parameters
|
|
857
861
|
----------
|
|
@@ -962,7 +966,7 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
962
966
|
self, *, job_id: str, files: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
|
|
963
967
|
) -> AsyncHttpResponse[FilesUploadResponse]:
|
|
964
968
|
"""
|
|
965
|
-
|
|
969
|
+
Generate presigned upload URLs for audio files that will be processed in a speech to text bulk job
|
|
966
970
|
|
|
967
971
|
Parameters
|
|
968
972
|
----------
|
|
@@ -1077,7 +1081,7 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1077
1081
|
self, *, job_id: str, files: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
|
|
1078
1082
|
) -> AsyncHttpResponse[FilesDownloadResponse]:
|
|
1079
1083
|
"""
|
|
1080
|
-
|
|
1084
|
+
Generate presigned download URLs for the transcription output files of a completed speech to text bulk job
|
|
1081
1085
|
|
|
1082
1086
|
Parameters
|
|
1083
1087
|
----------
|
|
@@ -53,7 +53,11 @@ class SpeechToTextStreamingClient:
|
|
|
53
53
|
request_options: typing.Optional[RequestOptions] = None,
|
|
54
54
|
) -> typing.Iterator[SpeechToTextStreamingSocketClient]:
|
|
55
55
|
"""
|
|
56
|
-
WebSocket channel for real-time speech to text streaming
|
|
56
|
+
WebSocket channel for real-time speech to text streaming.
|
|
57
|
+
|
|
58
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
59
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
60
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
57
61
|
|
|
58
62
|
Parameters
|
|
59
63
|
----------
|
|
@@ -158,7 +162,11 @@ class AsyncSpeechToTextStreamingClient:
|
|
|
158
162
|
request_options: typing.Optional[RequestOptions] = None,
|
|
159
163
|
) -> typing.AsyncIterator[AsyncSpeechToTextStreamingSocketClient]:
|
|
160
164
|
"""
|
|
161
|
-
WebSocket channel for real-time speech to text streaming
|
|
165
|
+
WebSocket channel for real-time speech to text streaming.
|
|
166
|
+
|
|
167
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
168
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
169
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
162
170
|
|
|
163
171
|
Parameters
|
|
164
172
|
----------
|
|
@@ -41,7 +41,11 @@ class RawSpeechToTextStreamingClient:
|
|
|
41
41
|
request_options: typing.Optional[RequestOptions] = None,
|
|
42
42
|
) -> typing.Iterator[SpeechToTextStreamingSocketClient]:
|
|
43
43
|
"""
|
|
44
|
-
WebSocket channel for real-time speech to text streaming
|
|
44
|
+
WebSocket channel for real-time speech to text streaming.
|
|
45
|
+
|
|
46
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
47
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
48
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
45
49
|
|
|
46
50
|
Parameters
|
|
47
51
|
----------
|
|
@@ -135,7 +139,11 @@ class AsyncRawSpeechToTextStreamingClient:
|
|
|
135
139
|
request_options: typing.Optional[RequestOptions] = None,
|
|
136
140
|
) -> typing.AsyncIterator[AsyncSpeechToTextStreamingSocketClient]:
|
|
137
141
|
"""
|
|
138
|
-
WebSocket channel for real-time speech to text streaming
|
|
142
|
+
WebSocket channel for real-time speech to text streaming.
|
|
143
|
+
|
|
144
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
145
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
146
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
139
147
|
|
|
140
148
|
Parameters
|
|
141
149
|
----------
|
|
@@ -150,9 +150,58 @@ class AsyncSpeechToTextTranslateJob:
|
|
|
150
150
|
"output_file": detail.outputs[0].file_name,
|
|
151
151
|
}
|
|
152
152
|
for detail in (job_status.job_details or [])
|
|
153
|
-
if detail.inputs and detail.outputs
|
|
153
|
+
if detail.inputs and detail.outputs and detail.state == "Success"
|
|
154
154
|
]
|
|
155
155
|
|
|
156
|
+
async def get_file_results(
|
|
157
|
+
self,
|
|
158
|
+
) -> typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]]:
|
|
159
|
+
"""
|
|
160
|
+
Get detailed results for each file in the batch job.
|
|
161
|
+
|
|
162
|
+
Returns
|
|
163
|
+
-------
|
|
164
|
+
Dict[str, List[Dict[str, Any]]]
|
|
165
|
+
Dictionary with 'successful' and 'failed' keys, each containing a list of file details.
|
|
166
|
+
Each file detail includes:
|
|
167
|
+
- 'file_name': Name of the input file
|
|
168
|
+
- 'status': Status of processing ('Success' or 'Failed')
|
|
169
|
+
- 'error_message': Error message if failed (None if successful)
|
|
170
|
+
- 'output_file': Name of output file if successful (None if failed)
|
|
171
|
+
"""
|
|
172
|
+
job_status = await self.get_status()
|
|
173
|
+
results: typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]] = {
|
|
174
|
+
"successful": [],
|
|
175
|
+
"failed": [],
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
for detail in job_status.job_details or []:
|
|
179
|
+
# Check for empty lists explicitly
|
|
180
|
+
if not detail.inputs or len(detail.inputs) == 0:
|
|
181
|
+
continue
|
|
182
|
+
|
|
183
|
+
try:
|
|
184
|
+
file_info = {
|
|
185
|
+
"file_name": detail.inputs[0].file_name,
|
|
186
|
+
"status": detail.state,
|
|
187
|
+
"error_message": detail.error_message,
|
|
188
|
+
"output_file": (
|
|
189
|
+
detail.outputs[0].file_name
|
|
190
|
+
if detail.outputs and len(detail.outputs) > 0
|
|
191
|
+
else None
|
|
192
|
+
),
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if detail.state == "Success":
|
|
196
|
+
results["successful"].append(file_info)
|
|
197
|
+
else:
|
|
198
|
+
results["failed"].append(file_info)
|
|
199
|
+
except (IndexError, AttributeError):
|
|
200
|
+
# Skip malformed job details
|
|
201
|
+
continue
|
|
202
|
+
|
|
203
|
+
return results
|
|
204
|
+
|
|
156
205
|
async def download_outputs(self, output_dir: str) -> bool:
|
|
157
206
|
"""
|
|
158
207
|
Download output files to the specified directory.
|
|
@@ -395,9 +444,58 @@ class SpeechToTextTranslateJob:
|
|
|
395
444
|
"output_file": detail.outputs[0].file_name,
|
|
396
445
|
}
|
|
397
446
|
for detail in (job_status.job_details or [])
|
|
398
|
-
if detail.inputs and detail.outputs
|
|
447
|
+
if detail.inputs and detail.outputs and detail.state == "Success"
|
|
399
448
|
]
|
|
400
449
|
|
|
450
|
+
def get_file_results(
|
|
451
|
+
self,
|
|
452
|
+
) -> typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]]:
|
|
453
|
+
"""
|
|
454
|
+
Get detailed results for each file in the batch job.
|
|
455
|
+
|
|
456
|
+
Returns
|
|
457
|
+
-------
|
|
458
|
+
Dict[str, List[Dict[str, Any]]]
|
|
459
|
+
Dictionary with 'successful' and 'failed' keys, each containing a list of file details.
|
|
460
|
+
Each file detail includes:
|
|
461
|
+
- 'file_name': Name of the input file
|
|
462
|
+
- 'status': Status of processing ('Success' or 'Failed')
|
|
463
|
+
- 'error_message': Error message if failed (None if successful)
|
|
464
|
+
- 'output_file': Name of output file if successful (None if failed)
|
|
465
|
+
"""
|
|
466
|
+
job_status = self.get_status()
|
|
467
|
+
results: typing.Dict[str, typing.List[typing.Dict[str, typing.Any]]] = {
|
|
468
|
+
"successful": [],
|
|
469
|
+
"failed": [],
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
for detail in job_status.job_details or []:
|
|
473
|
+
# Check for empty lists explicitly
|
|
474
|
+
if not detail.inputs or len(detail.inputs) == 0:
|
|
475
|
+
continue
|
|
476
|
+
|
|
477
|
+
try:
|
|
478
|
+
file_info = {
|
|
479
|
+
"file_name": detail.inputs[0].file_name,
|
|
480
|
+
"status": detail.state,
|
|
481
|
+
"error_message": detail.error_message,
|
|
482
|
+
"output_file": (
|
|
483
|
+
detail.outputs[0].file_name
|
|
484
|
+
if detail.outputs and len(detail.outputs) > 0
|
|
485
|
+
else None
|
|
486
|
+
),
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if detail.state == "Success":
|
|
490
|
+
results["successful"].append(file_info)
|
|
491
|
+
else:
|
|
492
|
+
results["failed"].append(file_info)
|
|
493
|
+
except (IndexError, AttributeError):
|
|
494
|
+
# Skip malformed job details
|
|
495
|
+
continue
|
|
496
|
+
|
|
497
|
+
return results
|
|
498
|
+
|
|
401
499
|
def download_outputs(self, output_dir: str) -> bool:
|
|
402
500
|
"""
|
|
403
501
|
Download output files to the specified directory.
|
|
@@ -40,7 +40,7 @@ class RawSpeechToTextTranslateJobClient:
|
|
|
40
40
|
request_options: typing.Optional[RequestOptions] = None,
|
|
41
41
|
) -> HttpResponse[BulkJobInitResponseV1]:
|
|
42
42
|
"""
|
|
43
|
-
|
|
43
|
+
Create a new speech to text translate bulk job and receive a job UUID and storage folder details for processing multiple audio files with translation
|
|
44
44
|
|
|
45
45
|
Parameters
|
|
46
46
|
----------
|
|
@@ -166,7 +166,9 @@ class RawSpeechToTextTranslateJobClient:
|
|
|
166
166
|
self, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
167
167
|
) -> HttpResponse[JobStatusV1Response]:
|
|
168
168
|
"""
|
|
169
|
-
|
|
169
|
+
Retrieve the current status and details of a speech to text translate bulk job, including progress and file-level information.
|
|
170
|
+
|
|
171
|
+
**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
|
|
170
172
|
|
|
171
173
|
Parameters
|
|
172
174
|
----------
|
|
@@ -276,7 +278,7 @@ class RawSpeechToTextTranslateJobClient:
|
|
|
276
278
|
request_options: typing.Optional[RequestOptions] = None,
|
|
277
279
|
) -> HttpResponse[JobStatusV1Response]:
|
|
278
280
|
"""
|
|
279
|
-
Start a speech to text translate bulk job
|
|
281
|
+
Start processing a speech to text translate bulk job after all audio files have been uploaded
|
|
280
282
|
|
|
281
283
|
Parameters
|
|
282
284
|
----------
|
|
@@ -392,7 +394,7 @@ class RawSpeechToTextTranslateJobClient:
|
|
|
392
394
|
request_options: typing.Optional[RequestOptions] = None,
|
|
393
395
|
) -> HttpResponse[FilesUploadResponse]:
|
|
394
396
|
"""
|
|
395
|
-
|
|
397
|
+
Generate presigned upload URLs for audio files that will be processed in a speech to text translate bulk job
|
|
396
398
|
|
|
397
399
|
Parameters
|
|
398
400
|
----------
|
|
@@ -517,7 +519,7 @@ class RawSpeechToTextTranslateJobClient:
|
|
|
517
519
|
request_options: typing.Optional[RequestOptions] = None,
|
|
518
520
|
) -> HttpResponse[FilesDownloadResponse]:
|
|
519
521
|
"""
|
|
520
|
-
|
|
522
|
+
Generate presigned download URLs for the translated transcription output files of a completed speech to text translate bulk job
|
|
521
523
|
|
|
522
524
|
Parameters
|
|
523
525
|
----------
|
|
@@ -647,7 +649,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
|
|
|
647
649
|
request_options: typing.Optional[RequestOptions] = None,
|
|
648
650
|
) -> AsyncHttpResponse[BulkJobInitResponseV1]:
|
|
649
651
|
"""
|
|
650
|
-
|
|
652
|
+
Create a new speech to text translate bulk job and receive a job UUID and storage folder details for processing multiple audio files with translation
|
|
651
653
|
|
|
652
654
|
Parameters
|
|
653
655
|
----------
|
|
@@ -773,7 +775,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
|
|
|
773
775
|
self, job_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
774
776
|
) -> AsyncHttpResponse[JobStatusV1Response]:
|
|
775
777
|
"""
|
|
776
|
-
|
|
778
|
+
Retrieve the current status and details of a speech to text translate bulk job, including progress and file-level information.
|
|
779
|
+
|
|
780
|
+
**Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates.
|
|
777
781
|
|
|
778
782
|
Parameters
|
|
779
783
|
----------
|
|
@@ -883,7 +887,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
|
|
|
883
887
|
request_options: typing.Optional[RequestOptions] = None,
|
|
884
888
|
) -> AsyncHttpResponse[JobStatusV1Response]:
|
|
885
889
|
"""
|
|
886
|
-
Start a speech to text translate bulk job
|
|
890
|
+
Start processing a speech to text translate bulk job after all audio files have been uploaded
|
|
887
891
|
|
|
888
892
|
Parameters
|
|
889
893
|
----------
|
|
@@ -999,7 +1003,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
|
|
|
999
1003
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1000
1004
|
) -> AsyncHttpResponse[FilesUploadResponse]:
|
|
1001
1005
|
"""
|
|
1002
|
-
|
|
1006
|
+
Generate presigned upload URLs for audio files that will be processed in a speech to text translate bulk job
|
|
1003
1007
|
|
|
1004
1008
|
Parameters
|
|
1005
1009
|
----------
|
|
@@ -1124,7 +1128,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
|
|
|
1124
1128
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1125
1129
|
) -> AsyncHttpResponse[FilesDownloadResponse]:
|
|
1126
1130
|
"""
|
|
1127
|
-
|
|
1131
|
+
Generate presigned download URLs for the translated transcription output files of a completed speech to text translate bulk job
|
|
1128
1132
|
|
|
1129
1133
|
Parameters
|
|
1130
1134
|
----------
|
|
@@ -53,7 +53,11 @@ class SpeechToTextTranslateStreamingClient:
|
|
|
53
53
|
request_options: typing.Optional[RequestOptions] = None,
|
|
54
54
|
) -> typing.Iterator[SpeechToTextTranslateStreamingSocketClient]:
|
|
55
55
|
"""
|
|
56
|
-
WebSocket channel for real-time speech to text streaming with English translation
|
|
56
|
+
WebSocket channel for real-time speech to text streaming with English translation.
|
|
57
|
+
|
|
58
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
59
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
60
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
57
61
|
|
|
58
62
|
Parameters
|
|
59
63
|
----------
|
|
@@ -152,7 +156,11 @@ class AsyncSpeechToTextTranslateStreamingClient:
|
|
|
152
156
|
request_options: typing.Optional[RequestOptions] = None,
|
|
153
157
|
) -> typing.AsyncIterator[AsyncSpeechToTextTranslateStreamingSocketClient]:
|
|
154
158
|
"""
|
|
155
|
-
WebSocket channel for real-time speech to text streaming with English translation
|
|
159
|
+
WebSocket channel for real-time speech to text streaming with English translation.
|
|
160
|
+
|
|
161
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
162
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
163
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
156
164
|
|
|
157
165
|
Parameters
|
|
158
166
|
----------
|
|
@@ -41,7 +41,11 @@ class RawSpeechToTextTranslateStreamingClient:
|
|
|
41
41
|
request_options: typing.Optional[RequestOptions] = None,
|
|
42
42
|
) -> typing.Iterator[SpeechToTextTranslateStreamingSocketClient]:
|
|
43
43
|
"""
|
|
44
|
-
WebSocket channel for real-time speech to text streaming with English translation
|
|
44
|
+
WebSocket channel for real-time speech to text streaming with English translation.
|
|
45
|
+
|
|
46
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
47
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
48
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
45
49
|
|
|
46
50
|
Parameters
|
|
47
51
|
----------
|
|
@@ -129,7 +133,11 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
|
|
|
129
133
|
request_options: typing.Optional[RequestOptions] = None,
|
|
130
134
|
) -> typing.AsyncIterator[AsyncSpeechToTextTranslateStreamingSocketClient]:
|
|
131
135
|
"""
|
|
132
|
-
WebSocket channel for real-time speech to text streaming with English translation
|
|
136
|
+
WebSocket channel for real-time speech to text streaming with English translation.
|
|
137
|
+
|
|
138
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
139
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
140
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
133
141
|
|
|
134
142
|
Parameters
|
|
135
143
|
----------
|
|
@@ -44,8 +44,11 @@ class TextToSpeechStreamingClient:
|
|
|
44
44
|
request_options: typing.Optional[RequestOptions] = None,
|
|
45
45
|
) -> typing.Iterator[TextToSpeechStreamingSocketClient]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
WebSocket channel for real-time TTS synthesis.
|
|
48
|
+
|
|
49
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
50
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
51
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
49
52
|
|
|
50
53
|
Parameters
|
|
51
54
|
----------
|
|
@@ -120,8 +123,11 @@ class AsyncTextToSpeechStreamingClient:
|
|
|
120
123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
121
124
|
) -> typing.AsyncIterator[AsyncTextToSpeechStreamingSocketClient]:
|
|
122
125
|
"""
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
WebSocket channel for real-time TTS synthesis.
|
|
127
|
+
|
|
128
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
129
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
130
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
125
131
|
|
|
126
132
|
Parameters
|
|
127
133
|
----------
|
|
@@ -32,8 +32,11 @@ class RawTextToSpeechStreamingClient:
|
|
|
32
32
|
request_options: typing.Optional[RequestOptions] = None,
|
|
33
33
|
) -> typing.Iterator[TextToSpeechStreamingSocketClient]:
|
|
34
34
|
"""
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
WebSocket channel for real-time TTS synthesis.
|
|
36
|
+
|
|
37
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
38
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
39
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
37
40
|
|
|
38
41
|
Parameters
|
|
39
42
|
----------
|
|
@@ -97,8 +100,11 @@ class AsyncRawTextToSpeechStreamingClient:
|
|
|
97
100
|
request_options: typing.Optional[RequestOptions] = None,
|
|
98
101
|
) -> typing.AsyncIterator[AsyncTextToSpeechStreamingSocketClient]:
|
|
99
102
|
"""
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
WebSocket channel for real-time TTS synthesis.
|
|
104
|
+
|
|
105
|
+
**Note:** This API Reference page is provided for informational purposes only.
|
|
106
|
+
The Try It playground may not provide the best experience for streaming audio.
|
|
107
|
+
For optimal streaming performance, please use the SDK or implement your own WebSocket client.
|
|
102
108
|
|
|
103
109
|
Parameters
|
|
104
110
|
----------
|
|
@@ -5,7 +5,7 @@ sarvamai/chat/raw_client.py,sha256=A2kRuZcVWlJhyYCD7YKgqNkZEp3cYa1731KhRkhirU0,1
|
|
|
5
5
|
sarvamai/client.py,sha256=J30X_os1lPf8Wml0KDFEf6p8VGHhgF_lf3nw1T2D3qo,8207
|
|
6
6
|
sarvamai/core/__init__.py,sha256=YE2CtXeASe1RAbaI39twKWYKCuT4tW5is9HWHhJjR_g,1653
|
|
7
7
|
sarvamai/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
8
|
-
sarvamai/core/client_wrapper.py,sha256=
|
|
8
|
+
sarvamai/core/client_wrapper.py,sha256=sGMqkb6El6oBbzNEZZ9dduRjqnu8IMbYtjYuuy9nUAg,2566
|
|
9
9
|
sarvamai/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
10
10
|
sarvamai/core/events.py,sha256=HvKBdSoYcFetk7cgNXb7FxuY-FtY8NtUhZIN7mGVx8U,1159
|
|
11
11
|
sarvamai/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
@@ -91,11 +91,11 @@ sarvamai/speech_to_text/client.py,sha256=JZ-3ZenTTcJkSAIb7Hkj8zBS4r2TV_jlynl4Ljx
|
|
|
91
91
|
sarvamai/speech_to_text/raw_client.py,sha256=oCGHyVtVBpXGRSWtAvR_r2j3tEumc9VEDjOYqMVxv5w,26677
|
|
92
92
|
sarvamai/speech_to_text_job/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
93
93
|
sarvamai/speech_to_text_job/client.py,sha256=WSGBJxYcNxl77Zd1X6VVWjg4zshqecXf6WCyhfLXVlI,18007
|
|
94
|
-
sarvamai/speech_to_text_job/job.py,sha256=
|
|
95
|
-
sarvamai/speech_to_text_job/raw_client.py,sha256=
|
|
94
|
+
sarvamai/speech_to_text_job/job.py,sha256=9AfVSp5nzrl-Cx_1n2AJZqTMzp6Dkz2cvmbdq78fCgM,18751
|
|
95
|
+
sarvamai/speech_to_text_job/raw_client.py,sha256=6MB82mSqAOi92mE8vUeNSTB0wuxLZYRwizt15R6r-wo,49394
|
|
96
96
|
sarvamai/speech_to_text_streaming/__init__.py,sha256=-7nN6AJFryjSvGHVbajYEt-vni6kNDfJUiZJFNl_ao4,535
|
|
97
|
-
sarvamai/speech_to_text_streaming/client.py,sha256=
|
|
98
|
-
sarvamai/speech_to_text_streaming/raw_client.py,sha256=
|
|
97
|
+
sarvamai/speech_to_text_streaming/client.py,sha256=GU3bin0Ea6rOoX-hc9iUStPU0rh6ThezKW-r8d3NgTg,11732
|
|
98
|
+
sarvamai/speech_to_text_streaming/raw_client.py,sha256=lUxjNbdxfirnAcPd4mMhd0EK7c0Z1i9Fa-hHscviFmg,10913
|
|
99
99
|
sarvamai/speech_to_text_streaming/socket_client.py,sha256=P6qXRN0s3UFAp6CP5lkqrW2KPK9me70ZVfWquxLB4wI,7538
|
|
100
100
|
sarvamai/speech_to_text_streaming/types/__init__.py,sha256=_G5TSTthsnjGmwdV4fpsybjEWMMTNkh-kWXZjgK5X48,755
|
|
101
101
|
sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_flush_signal.py,sha256=dDJOBlzAjhuiSVqW2RHHY1f6xy0DU_Yoo9UV8-7MjnA,173
|
|
@@ -105,11 +105,11 @@ sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_language_code.p
|
|
|
105
105
|
sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_vad_signals.py,sha256=8wiFOB7WDMbYCcMTYgNFJaIjEytYeXpJLwr_O_mH0TI,172
|
|
106
106
|
sarvamai/speech_to_text_translate_job/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
107
107
|
sarvamai/speech_to_text_translate_job/client.py,sha256=xu8kYtCESDB7LzL8YKBUq5qhTPMIl3_H3XD2L_7y4UU,18969
|
|
108
|
-
sarvamai/speech_to_text_translate_job/job.py,sha256=
|
|
109
|
-
sarvamai/speech_to_text_translate_job/raw_client.py,sha256=
|
|
108
|
+
sarvamai/speech_to_text_translate_job/job.py,sha256=tL1Zemsogb_AK9wqZwN4ooPaN176sFKduTH9g87y-WU,18938
|
|
109
|
+
sarvamai/speech_to_text_translate_job/raw_client.py,sha256=Emx14cRiAZXg1PqZkoJbDOKwyDmOgwxWlqPkAPZ9GPU,50797
|
|
110
110
|
sarvamai/speech_to_text_translate_streaming/__init__.py,sha256=s6HPwrkABpkhDSsd_t6pVRiWfY4MfVE0lVj9b4V_fx4,527
|
|
111
|
-
sarvamai/speech_to_text_translate_streaming/client.py,sha256=
|
|
112
|
-
sarvamai/speech_to_text_translate_streaming/raw_client.py,sha256=
|
|
111
|
+
sarvamai/speech_to_text_translate_streaming/client.py,sha256=jXfucb5A5uyKgbAB_tJDYCn86Myv8k8Cs-BIBqaZGHo,11659
|
|
112
|
+
sarvamai/speech_to_text_translate_streaming/raw_client.py,sha256=1TKO5mrqI234wGWPlcyKS-9ObLuY6XRcgYExxv1CJhY,10768
|
|
113
113
|
sarvamai/speech_to_text_translate_streaming/socket_client.py,sha256=ipEPSj5eHAyDpuEXfaP7JJL1rXJXGEo-IB888ReAFKs,8901
|
|
114
114
|
sarvamai/speech_to_text_translate_streaming/types/__init__.py,sha256=nsKmvwkhcPekF9kcStDhTDilALFf2jT-wfCn25KVe7U,740
|
|
115
115
|
sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_flush_signal.py,sha256=jkjvCGJ1pFKi3AOTkwMW-lo18WGgrgAhMpoe5P0AMzA,182
|
|
@@ -123,8 +123,8 @@ sarvamai/text_to_speech/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUz
|
|
|
123
123
|
sarvamai/text_to_speech/client.py,sha256=iwrQNfoMgCSOgvztTIXtLHQmSmn0RInwt5RSo9TwdtA,9617
|
|
124
124
|
sarvamai/text_to_speech/raw_client.py,sha256=si_aSjMR7SocIpKZFoVYqBmaIDuRm_6vxTM0dJ73PEo,15569
|
|
125
125
|
sarvamai/text_to_speech_streaming/__init__.py,sha256=TjBDNPwnsPQpuVZzh7Xi27A51pEEfVyaC8dpvafkmvQ,201
|
|
126
|
-
sarvamai/text_to_speech_streaming/client.py,sha256=
|
|
127
|
-
sarvamai/text_to_speech_streaming/raw_client.py,sha256=
|
|
126
|
+
sarvamai/text_to_speech_streaming/client.py,sha256=SaYSHYzBn3BeFRZPumXQJD1EeAYISnAmDomCPxVdyPk,7793
|
|
127
|
+
sarvamai/text_to_speech_streaming/raw_client.py,sha256=E-4cVcgYA1MQRq2YkLoGt1OU3ZsYQ1wPqdQ4vjhO7ug,6974
|
|
128
128
|
sarvamai/text_to_speech_streaming/socket_client.py,sha256=aun1nyc5ZYziXP0FmyvkCB0WKa_VdjA0XHYI2-Z_gCo,13973
|
|
129
129
|
sarvamai/text_to_speech_streaming/types/__init__.py,sha256=fx2VJtnbh4RFUETiV2aPGslEQ0lq_us4UjDbQr_2J6I,242
|
|
130
130
|
sarvamai/text_to_speech_streaming/types/text_to_speech_streaming_send_completion_event.py,sha256=cZWm6cAwNwPGF8ZADtnRev_AsgM_xj5ypg2oHHQfgZI,181
|
|
@@ -224,6 +224,6 @@ sarvamai/types/transliterate_mode.py,sha256=1jSEMlGcoLkWuk12TgoOpSgwifa4rThGKZ1h
|
|
|
224
224
|
sarvamai/types/transliterate_source_language.py,sha256=bSY9wJszF0sg-Cgg6F-YcWC8ly1mIlj9rqa15-jBtx8,283
|
|
225
225
|
sarvamai/types/transliteration_response.py,sha256=yt-lzTbDeJ_ZL4I8kQa6oESxA9ebeJJY7LfFHpdEsmM,815
|
|
226
226
|
sarvamai/version.py,sha256=Qkp3Ee9YH-O9RTix90e0i7iNrFAGN-QDt2AFwGA4n8k,75
|
|
227
|
-
sarvamai-0.1.
|
|
228
|
-
sarvamai-0.1.
|
|
229
|
-
sarvamai-0.1.
|
|
227
|
+
sarvamai-0.1.22.dist-info/METADATA,sha256=3YrJCpCm4hQ1pGHXjqr7c2L-OtvDqvumCQE1JP1Twqk,26751
|
|
228
|
+
sarvamai-0.1.22.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
229
|
+
sarvamai-0.1.22.dist-info/RECORD,,
|
|
File without changes
|