sarvamai 0.1.22a3__py3-none-any.whl → 0.1.23a1__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.
Files changed (64) hide show
  1. sarvamai/__init__.py +405 -206
  2. sarvamai/chat/raw_client.py +20 -20
  3. sarvamai/client.py +186 -34
  4. sarvamai/core/__init__.py +76 -21
  5. sarvamai/core/client_wrapper.py +19 -3
  6. sarvamai/core/force_multipart.py +4 -2
  7. sarvamai/core/http_client.py +217 -97
  8. sarvamai/core/http_response.py +1 -1
  9. sarvamai/core/http_sse/__init__.py +42 -0
  10. sarvamai/core/http_sse/_api.py +112 -0
  11. sarvamai/core/http_sse/_decoders.py +61 -0
  12. sarvamai/core/http_sse/_exceptions.py +7 -0
  13. sarvamai/core/http_sse/_models.py +17 -0
  14. sarvamai/core/jsonable_encoder.py +8 -0
  15. sarvamai/core/pydantic_utilities.py +110 -4
  16. sarvamai/errors/__init__.py +40 -6
  17. sarvamai/errors/bad_request_error.py +1 -1
  18. sarvamai/errors/forbidden_error.py +1 -1
  19. sarvamai/errors/internal_server_error.py +1 -1
  20. sarvamai/errors/service_unavailable_error.py +1 -1
  21. sarvamai/errors/too_many_requests_error.py +1 -1
  22. sarvamai/errors/unprocessable_entity_error.py +1 -1
  23. sarvamai/requests/__init__.py +150 -62
  24. sarvamai/requests/audio_data.py +0 -6
  25. sarvamai/requests/error_response_data.py +1 -1
  26. sarvamai/requests/file_signed_url_details.py +1 -1
  27. sarvamai/requests/speech_to_text_transcription_data.py +2 -8
  28. sarvamai/requests/speech_to_text_translate_transcription_data.py +0 -6
  29. sarvamai/speech_to_text/raw_client.py +54 -52
  30. sarvamai/speech_to_text_job/job.py +100 -2
  31. sarvamai/speech_to_text_job/raw_client.py +134 -130
  32. sarvamai/speech_to_text_streaming/__init__.py +38 -10
  33. sarvamai/speech_to_text_streaming/client.py +0 -44
  34. sarvamai/speech_to_text_streaming/raw_client.py +0 -44
  35. sarvamai/speech_to_text_streaming/types/__init__.py +36 -8
  36. sarvamai/speech_to_text_translate_job/job.py +100 -2
  37. sarvamai/speech_to_text_translate_job/raw_client.py +134 -130
  38. sarvamai/speech_to_text_translate_streaming/__init__.py +36 -9
  39. sarvamai/speech_to_text_translate_streaming/client.py +0 -44
  40. sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -44
  41. sarvamai/speech_to_text_translate_streaming/types/__init__.py +36 -9
  42. sarvamai/text/client.py +0 -12
  43. sarvamai/text/raw_client.py +60 -72
  44. sarvamai/text_to_speech/client.py +18 -0
  45. sarvamai/text_to_speech/raw_client.py +38 -20
  46. sarvamai/text_to_speech_streaming/__init__.py +28 -1
  47. sarvamai/text_to_speech_streaming/types/__init__.py +30 -1
  48. sarvamai/types/__init__.py +222 -102
  49. sarvamai/types/audio_data.py +0 -6
  50. sarvamai/types/chat_completion_request_message.py +6 -2
  51. sarvamai/types/completion_event_flag.py +3 -1
  52. sarvamai/types/error_response_data.py +1 -1
  53. sarvamai/types/file_signed_url_details.py +1 -1
  54. sarvamai/types/speech_to_text_transcription_data.py +2 -8
  55. sarvamai/types/speech_to_text_translate_transcription_data.py +0 -6
  56. {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/METADATA +2 -1
  57. {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/RECORD +58 -59
  58. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +0 -33
  59. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_stream_ongoing_speech_results.py +0 -5
  60. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +0 -33
  61. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_stream_ongoing_speech_results.py +0 -5
  62. sarvamai/types/audio_data_input_audio_codec.py +0 -33
  63. sarvamai/types/response_speech_state.py +0 -7
  64. {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/WHEEL +0 -0
@@ -40,7 +40,7 @@ class RawSpeechToTextTranslateJobClient:
40
40
  request_options: typing.Optional[RequestOptions] = None,
41
41
  ) -> HttpResponse[BulkJobInitResponseV1]:
42
42
  """
43
- Get a job uuid, and storage folder details for speech to text tranlsate bulk job v1
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
  ----------
@@ -95,9 +95,9 @@ class RawSpeechToTextTranslateJobClient:
95
95
  raise BadRequestError(
96
96
  headers=dict(_response.headers),
97
97
  body=typing.cast(
98
- typing.Optional[typing.Any],
98
+ typing.Any,
99
99
  parse_obj_as(
100
- type_=typing.Optional[typing.Any], # type: ignore
100
+ type_=typing.Any, # type: ignore
101
101
  object_=_response.json(),
102
102
  ),
103
103
  ),
@@ -106,9 +106,9 @@ class RawSpeechToTextTranslateJobClient:
106
106
  raise ForbiddenError(
107
107
  headers=dict(_response.headers),
108
108
  body=typing.cast(
109
- typing.Optional[typing.Any],
109
+ typing.Any,
110
110
  parse_obj_as(
111
- type_=typing.Optional[typing.Any], # type: ignore
111
+ type_=typing.Any, # type: ignore
112
112
  object_=_response.json(),
113
113
  ),
114
114
  ),
@@ -117,9 +117,9 @@ class RawSpeechToTextTranslateJobClient:
117
117
  raise UnprocessableEntityError(
118
118
  headers=dict(_response.headers),
119
119
  body=typing.cast(
120
- typing.Optional[typing.Any],
120
+ typing.Any,
121
121
  parse_obj_as(
122
- type_=typing.Optional[typing.Any], # type: ignore
122
+ type_=typing.Any, # type: ignore
123
123
  object_=_response.json(),
124
124
  ),
125
125
  ),
@@ -128,9 +128,9 @@ class RawSpeechToTextTranslateJobClient:
128
128
  raise TooManyRequestsError(
129
129
  headers=dict(_response.headers),
130
130
  body=typing.cast(
131
- typing.Optional[typing.Any],
131
+ typing.Any,
132
132
  parse_obj_as(
133
- type_=typing.Optional[typing.Any], # type: ignore
133
+ type_=typing.Any, # type: ignore
134
134
  object_=_response.json(),
135
135
  ),
136
136
  ),
@@ -139,9 +139,9 @@ class RawSpeechToTextTranslateJobClient:
139
139
  raise InternalServerError(
140
140
  headers=dict(_response.headers),
141
141
  body=typing.cast(
142
- typing.Optional[typing.Any],
142
+ typing.Any,
143
143
  parse_obj_as(
144
- type_=typing.Optional[typing.Any], # type: ignore
144
+ type_=typing.Any, # type: ignore
145
145
  object_=_response.json(),
146
146
  ),
147
147
  ),
@@ -150,9 +150,9 @@ class RawSpeechToTextTranslateJobClient:
150
150
  raise ServiceUnavailableError(
151
151
  headers=dict(_response.headers),
152
152
  body=typing.cast(
153
- typing.Optional[typing.Any],
153
+ typing.Any,
154
154
  parse_obj_as(
155
- type_=typing.Optional[typing.Any], # type: ignore
155
+ type_=typing.Any, # type: ignore
156
156
  object_=_response.json(),
157
157
  ),
158
158
  ),
@@ -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
- Get the status of a speech to text translate bulk job V1
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
  ----------
@@ -201,9 +203,9 @@ class RawSpeechToTextTranslateJobClient:
201
203
  raise BadRequestError(
202
204
  headers=dict(_response.headers),
203
205
  body=typing.cast(
204
- typing.Optional[typing.Any],
206
+ typing.Any,
205
207
  parse_obj_as(
206
- type_=typing.Optional[typing.Any], # type: ignore
208
+ type_=typing.Any, # type: ignore
207
209
  object_=_response.json(),
208
210
  ),
209
211
  ),
@@ -212,9 +214,9 @@ class RawSpeechToTextTranslateJobClient:
212
214
  raise ForbiddenError(
213
215
  headers=dict(_response.headers),
214
216
  body=typing.cast(
215
- typing.Optional[typing.Any],
217
+ typing.Any,
216
218
  parse_obj_as(
217
- type_=typing.Optional[typing.Any], # type: ignore
219
+ type_=typing.Any, # type: ignore
218
220
  object_=_response.json(),
219
221
  ),
220
222
  ),
@@ -223,9 +225,9 @@ class RawSpeechToTextTranslateJobClient:
223
225
  raise UnprocessableEntityError(
224
226
  headers=dict(_response.headers),
225
227
  body=typing.cast(
226
- typing.Optional[typing.Any],
228
+ typing.Any,
227
229
  parse_obj_as(
228
- type_=typing.Optional[typing.Any], # type: ignore
230
+ type_=typing.Any, # type: ignore
229
231
  object_=_response.json(),
230
232
  ),
231
233
  ),
@@ -234,9 +236,9 @@ class RawSpeechToTextTranslateJobClient:
234
236
  raise TooManyRequestsError(
235
237
  headers=dict(_response.headers),
236
238
  body=typing.cast(
237
- typing.Optional[typing.Any],
239
+ typing.Any,
238
240
  parse_obj_as(
239
- type_=typing.Optional[typing.Any], # type: ignore
241
+ type_=typing.Any, # type: ignore
240
242
  object_=_response.json(),
241
243
  ),
242
244
  ),
@@ -245,9 +247,9 @@ class RawSpeechToTextTranslateJobClient:
245
247
  raise InternalServerError(
246
248
  headers=dict(_response.headers),
247
249
  body=typing.cast(
248
- typing.Optional[typing.Any],
250
+ typing.Any,
249
251
  parse_obj_as(
250
- type_=typing.Optional[typing.Any], # type: ignore
252
+ type_=typing.Any, # type: ignore
251
253
  object_=_response.json(),
252
254
  ),
253
255
  ),
@@ -256,9 +258,9 @@ class RawSpeechToTextTranslateJobClient:
256
258
  raise ServiceUnavailableError(
257
259
  headers=dict(_response.headers),
258
260
  body=typing.cast(
259
- typing.Optional[typing.Any],
261
+ typing.Any,
260
262
  parse_obj_as(
261
- type_=typing.Optional[typing.Any], # type: ignore
263
+ type_=typing.Any, # type: ignore
262
264
  object_=_response.json(),
263
265
  ),
264
266
  ),
@@ -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 V1
281
+ Start processing a speech to text translate bulk job after all audio files have been uploaded
280
282
 
281
283
  Parameters
282
284
  ----------
@@ -316,9 +318,9 @@ class RawSpeechToTextTranslateJobClient:
316
318
  raise BadRequestError(
317
319
  headers=dict(_response.headers),
318
320
  body=typing.cast(
319
- typing.Optional[typing.Any],
321
+ typing.Any,
320
322
  parse_obj_as(
321
- type_=typing.Optional[typing.Any], # type: ignore
323
+ type_=typing.Any, # type: ignore
322
324
  object_=_response.json(),
323
325
  ),
324
326
  ),
@@ -327,9 +329,9 @@ class RawSpeechToTextTranslateJobClient:
327
329
  raise ForbiddenError(
328
330
  headers=dict(_response.headers),
329
331
  body=typing.cast(
330
- typing.Optional[typing.Any],
332
+ typing.Any,
331
333
  parse_obj_as(
332
- type_=typing.Optional[typing.Any], # type: ignore
334
+ type_=typing.Any, # type: ignore
333
335
  object_=_response.json(),
334
336
  ),
335
337
  ),
@@ -338,9 +340,9 @@ class RawSpeechToTextTranslateJobClient:
338
340
  raise UnprocessableEntityError(
339
341
  headers=dict(_response.headers),
340
342
  body=typing.cast(
341
- typing.Optional[typing.Any],
343
+ typing.Any,
342
344
  parse_obj_as(
343
- type_=typing.Optional[typing.Any], # type: ignore
345
+ type_=typing.Any, # type: ignore
344
346
  object_=_response.json(),
345
347
  ),
346
348
  ),
@@ -349,9 +351,9 @@ class RawSpeechToTextTranslateJobClient:
349
351
  raise TooManyRequestsError(
350
352
  headers=dict(_response.headers),
351
353
  body=typing.cast(
352
- typing.Optional[typing.Any],
354
+ typing.Any,
353
355
  parse_obj_as(
354
- type_=typing.Optional[typing.Any], # type: ignore
356
+ type_=typing.Any, # type: ignore
355
357
  object_=_response.json(),
356
358
  ),
357
359
  ),
@@ -360,9 +362,9 @@ class RawSpeechToTextTranslateJobClient:
360
362
  raise InternalServerError(
361
363
  headers=dict(_response.headers),
362
364
  body=typing.cast(
363
- typing.Optional[typing.Any],
365
+ typing.Any,
364
366
  parse_obj_as(
365
- type_=typing.Optional[typing.Any], # type: ignore
367
+ type_=typing.Any, # type: ignore
366
368
  object_=_response.json(),
367
369
  ),
368
370
  ),
@@ -371,9 +373,9 @@ class RawSpeechToTextTranslateJobClient:
371
373
  raise ServiceUnavailableError(
372
374
  headers=dict(_response.headers),
373
375
  body=typing.cast(
374
- typing.Optional[typing.Any],
376
+ typing.Any,
375
377
  parse_obj_as(
376
- type_=typing.Optional[typing.Any], # type: ignore
378
+ type_=typing.Any, # type: ignore
377
379
  object_=_response.json(),
378
380
  ),
379
381
  ),
@@ -392,7 +394,7 @@ class RawSpeechToTextTranslateJobClient:
392
394
  request_options: typing.Optional[RequestOptions] = None,
393
395
  ) -> HttpResponse[FilesUploadResponse]:
394
396
  """
395
- Start a speech to text bulk job V1
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
  ----------
@@ -441,9 +443,9 @@ class RawSpeechToTextTranslateJobClient:
441
443
  raise BadRequestError(
442
444
  headers=dict(_response.headers),
443
445
  body=typing.cast(
444
- typing.Optional[typing.Any],
446
+ typing.Any,
445
447
  parse_obj_as(
446
- type_=typing.Optional[typing.Any], # type: ignore
448
+ type_=typing.Any, # type: ignore
447
449
  object_=_response.json(),
448
450
  ),
449
451
  ),
@@ -452,9 +454,9 @@ class RawSpeechToTextTranslateJobClient:
452
454
  raise ForbiddenError(
453
455
  headers=dict(_response.headers),
454
456
  body=typing.cast(
455
- typing.Optional[typing.Any],
457
+ typing.Any,
456
458
  parse_obj_as(
457
- type_=typing.Optional[typing.Any], # type: ignore
459
+ type_=typing.Any, # type: ignore
458
460
  object_=_response.json(),
459
461
  ),
460
462
  ),
@@ -463,9 +465,9 @@ class RawSpeechToTextTranslateJobClient:
463
465
  raise UnprocessableEntityError(
464
466
  headers=dict(_response.headers),
465
467
  body=typing.cast(
466
- typing.Optional[typing.Any],
468
+ typing.Any,
467
469
  parse_obj_as(
468
- type_=typing.Optional[typing.Any], # type: ignore
470
+ type_=typing.Any, # type: ignore
469
471
  object_=_response.json(),
470
472
  ),
471
473
  ),
@@ -474,9 +476,9 @@ class RawSpeechToTextTranslateJobClient:
474
476
  raise TooManyRequestsError(
475
477
  headers=dict(_response.headers),
476
478
  body=typing.cast(
477
- typing.Optional[typing.Any],
479
+ typing.Any,
478
480
  parse_obj_as(
479
- type_=typing.Optional[typing.Any], # type: ignore
481
+ type_=typing.Any, # type: ignore
480
482
  object_=_response.json(),
481
483
  ),
482
484
  ),
@@ -485,9 +487,9 @@ class RawSpeechToTextTranslateJobClient:
485
487
  raise InternalServerError(
486
488
  headers=dict(_response.headers),
487
489
  body=typing.cast(
488
- typing.Optional[typing.Any],
490
+ typing.Any,
489
491
  parse_obj_as(
490
- type_=typing.Optional[typing.Any], # type: ignore
492
+ type_=typing.Any, # type: ignore
491
493
  object_=_response.json(),
492
494
  ),
493
495
  ),
@@ -496,9 +498,9 @@ class RawSpeechToTextTranslateJobClient:
496
498
  raise ServiceUnavailableError(
497
499
  headers=dict(_response.headers),
498
500
  body=typing.cast(
499
- typing.Optional[typing.Any],
501
+ typing.Any,
500
502
  parse_obj_as(
501
- type_=typing.Optional[typing.Any], # type: ignore
503
+ type_=typing.Any, # type: ignore
502
504
  object_=_response.json(),
503
505
  ),
504
506
  ),
@@ -517,7 +519,7 @@ class RawSpeechToTextTranslateJobClient:
517
519
  request_options: typing.Optional[RequestOptions] = None,
518
520
  ) -> HttpResponse[FilesDownloadResponse]:
519
521
  """
520
- Start a speech to text bulk job V1
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
  ----------
@@ -566,9 +568,9 @@ class RawSpeechToTextTranslateJobClient:
566
568
  raise BadRequestError(
567
569
  headers=dict(_response.headers),
568
570
  body=typing.cast(
569
- typing.Optional[typing.Any],
571
+ typing.Any,
570
572
  parse_obj_as(
571
- type_=typing.Optional[typing.Any], # type: ignore
573
+ type_=typing.Any, # type: ignore
572
574
  object_=_response.json(),
573
575
  ),
574
576
  ),
@@ -577,9 +579,9 @@ class RawSpeechToTextTranslateJobClient:
577
579
  raise ForbiddenError(
578
580
  headers=dict(_response.headers),
579
581
  body=typing.cast(
580
- typing.Optional[typing.Any],
582
+ typing.Any,
581
583
  parse_obj_as(
582
- type_=typing.Optional[typing.Any], # type: ignore
584
+ type_=typing.Any, # type: ignore
583
585
  object_=_response.json(),
584
586
  ),
585
587
  ),
@@ -588,9 +590,9 @@ class RawSpeechToTextTranslateJobClient:
588
590
  raise UnprocessableEntityError(
589
591
  headers=dict(_response.headers),
590
592
  body=typing.cast(
591
- typing.Optional[typing.Any],
593
+ typing.Any,
592
594
  parse_obj_as(
593
- type_=typing.Optional[typing.Any], # type: ignore
595
+ type_=typing.Any, # type: ignore
594
596
  object_=_response.json(),
595
597
  ),
596
598
  ),
@@ -599,9 +601,9 @@ class RawSpeechToTextTranslateJobClient:
599
601
  raise TooManyRequestsError(
600
602
  headers=dict(_response.headers),
601
603
  body=typing.cast(
602
- typing.Optional[typing.Any],
604
+ typing.Any,
603
605
  parse_obj_as(
604
- type_=typing.Optional[typing.Any], # type: ignore
606
+ type_=typing.Any, # type: ignore
605
607
  object_=_response.json(),
606
608
  ),
607
609
  ),
@@ -610,9 +612,9 @@ class RawSpeechToTextTranslateJobClient:
610
612
  raise InternalServerError(
611
613
  headers=dict(_response.headers),
612
614
  body=typing.cast(
613
- typing.Optional[typing.Any],
615
+ typing.Any,
614
616
  parse_obj_as(
615
- type_=typing.Optional[typing.Any], # type: ignore
617
+ type_=typing.Any, # type: ignore
616
618
  object_=_response.json(),
617
619
  ),
618
620
  ),
@@ -621,9 +623,9 @@ class RawSpeechToTextTranslateJobClient:
621
623
  raise ServiceUnavailableError(
622
624
  headers=dict(_response.headers),
623
625
  body=typing.cast(
624
- typing.Optional[typing.Any],
626
+ typing.Any,
625
627
  parse_obj_as(
626
- type_=typing.Optional[typing.Any], # type: ignore
628
+ type_=typing.Any, # type: ignore
627
629
  object_=_response.json(),
628
630
  ),
629
631
  ),
@@ -647,7 +649,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
647
649
  request_options: typing.Optional[RequestOptions] = None,
648
650
  ) -> AsyncHttpResponse[BulkJobInitResponseV1]:
649
651
  """
650
- Get a job uuid, and storage folder details for speech to text tranlsate bulk job v1
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
  ----------
@@ -702,9 +704,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
702
704
  raise BadRequestError(
703
705
  headers=dict(_response.headers),
704
706
  body=typing.cast(
705
- typing.Optional[typing.Any],
707
+ typing.Any,
706
708
  parse_obj_as(
707
- type_=typing.Optional[typing.Any], # type: ignore
709
+ type_=typing.Any, # type: ignore
708
710
  object_=_response.json(),
709
711
  ),
710
712
  ),
@@ -713,9 +715,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
713
715
  raise ForbiddenError(
714
716
  headers=dict(_response.headers),
715
717
  body=typing.cast(
716
- typing.Optional[typing.Any],
718
+ typing.Any,
717
719
  parse_obj_as(
718
- type_=typing.Optional[typing.Any], # type: ignore
720
+ type_=typing.Any, # type: ignore
719
721
  object_=_response.json(),
720
722
  ),
721
723
  ),
@@ -724,9 +726,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
724
726
  raise UnprocessableEntityError(
725
727
  headers=dict(_response.headers),
726
728
  body=typing.cast(
727
- typing.Optional[typing.Any],
729
+ typing.Any,
728
730
  parse_obj_as(
729
- type_=typing.Optional[typing.Any], # type: ignore
731
+ type_=typing.Any, # type: ignore
730
732
  object_=_response.json(),
731
733
  ),
732
734
  ),
@@ -735,9 +737,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
735
737
  raise TooManyRequestsError(
736
738
  headers=dict(_response.headers),
737
739
  body=typing.cast(
738
- typing.Optional[typing.Any],
740
+ typing.Any,
739
741
  parse_obj_as(
740
- type_=typing.Optional[typing.Any], # type: ignore
742
+ type_=typing.Any, # type: ignore
741
743
  object_=_response.json(),
742
744
  ),
743
745
  ),
@@ -746,9 +748,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
746
748
  raise InternalServerError(
747
749
  headers=dict(_response.headers),
748
750
  body=typing.cast(
749
- typing.Optional[typing.Any],
751
+ typing.Any,
750
752
  parse_obj_as(
751
- type_=typing.Optional[typing.Any], # type: ignore
753
+ type_=typing.Any, # type: ignore
752
754
  object_=_response.json(),
753
755
  ),
754
756
  ),
@@ -757,9 +759,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
757
759
  raise ServiceUnavailableError(
758
760
  headers=dict(_response.headers),
759
761
  body=typing.cast(
760
- typing.Optional[typing.Any],
762
+ typing.Any,
761
763
  parse_obj_as(
762
- type_=typing.Optional[typing.Any], # type: ignore
764
+ type_=typing.Any, # type: ignore
763
765
  object_=_response.json(),
764
766
  ),
765
767
  ),
@@ -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
- Get the status of a speech to text translate bulk job V1
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
  ----------
@@ -808,9 +812,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
808
812
  raise BadRequestError(
809
813
  headers=dict(_response.headers),
810
814
  body=typing.cast(
811
- typing.Optional[typing.Any],
815
+ typing.Any,
812
816
  parse_obj_as(
813
- type_=typing.Optional[typing.Any], # type: ignore
817
+ type_=typing.Any, # type: ignore
814
818
  object_=_response.json(),
815
819
  ),
816
820
  ),
@@ -819,9 +823,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
819
823
  raise ForbiddenError(
820
824
  headers=dict(_response.headers),
821
825
  body=typing.cast(
822
- typing.Optional[typing.Any],
826
+ typing.Any,
823
827
  parse_obj_as(
824
- type_=typing.Optional[typing.Any], # type: ignore
828
+ type_=typing.Any, # type: ignore
825
829
  object_=_response.json(),
826
830
  ),
827
831
  ),
@@ -830,9 +834,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
830
834
  raise UnprocessableEntityError(
831
835
  headers=dict(_response.headers),
832
836
  body=typing.cast(
833
- typing.Optional[typing.Any],
837
+ typing.Any,
834
838
  parse_obj_as(
835
- type_=typing.Optional[typing.Any], # type: ignore
839
+ type_=typing.Any, # type: ignore
836
840
  object_=_response.json(),
837
841
  ),
838
842
  ),
@@ -841,9 +845,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
841
845
  raise TooManyRequestsError(
842
846
  headers=dict(_response.headers),
843
847
  body=typing.cast(
844
- typing.Optional[typing.Any],
848
+ typing.Any,
845
849
  parse_obj_as(
846
- type_=typing.Optional[typing.Any], # type: ignore
850
+ type_=typing.Any, # type: ignore
847
851
  object_=_response.json(),
848
852
  ),
849
853
  ),
@@ -852,9 +856,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
852
856
  raise InternalServerError(
853
857
  headers=dict(_response.headers),
854
858
  body=typing.cast(
855
- typing.Optional[typing.Any],
859
+ typing.Any,
856
860
  parse_obj_as(
857
- type_=typing.Optional[typing.Any], # type: ignore
861
+ type_=typing.Any, # type: ignore
858
862
  object_=_response.json(),
859
863
  ),
860
864
  ),
@@ -863,9 +867,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
863
867
  raise ServiceUnavailableError(
864
868
  headers=dict(_response.headers),
865
869
  body=typing.cast(
866
- typing.Optional[typing.Any],
870
+ typing.Any,
867
871
  parse_obj_as(
868
- type_=typing.Optional[typing.Any], # type: ignore
872
+ type_=typing.Any, # type: ignore
869
873
  object_=_response.json(),
870
874
  ),
871
875
  ),
@@ -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 V1
890
+ Start processing a speech to text translate bulk job after all audio files have been uploaded
887
891
 
888
892
  Parameters
889
893
  ----------
@@ -923,9 +927,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
923
927
  raise BadRequestError(
924
928
  headers=dict(_response.headers),
925
929
  body=typing.cast(
926
- typing.Optional[typing.Any],
930
+ typing.Any,
927
931
  parse_obj_as(
928
- type_=typing.Optional[typing.Any], # type: ignore
932
+ type_=typing.Any, # type: ignore
929
933
  object_=_response.json(),
930
934
  ),
931
935
  ),
@@ -934,9 +938,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
934
938
  raise ForbiddenError(
935
939
  headers=dict(_response.headers),
936
940
  body=typing.cast(
937
- typing.Optional[typing.Any],
941
+ typing.Any,
938
942
  parse_obj_as(
939
- type_=typing.Optional[typing.Any], # type: ignore
943
+ type_=typing.Any, # type: ignore
940
944
  object_=_response.json(),
941
945
  ),
942
946
  ),
@@ -945,9 +949,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
945
949
  raise UnprocessableEntityError(
946
950
  headers=dict(_response.headers),
947
951
  body=typing.cast(
948
- typing.Optional[typing.Any],
952
+ typing.Any,
949
953
  parse_obj_as(
950
- type_=typing.Optional[typing.Any], # type: ignore
954
+ type_=typing.Any, # type: ignore
951
955
  object_=_response.json(),
952
956
  ),
953
957
  ),
@@ -956,9 +960,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
956
960
  raise TooManyRequestsError(
957
961
  headers=dict(_response.headers),
958
962
  body=typing.cast(
959
- typing.Optional[typing.Any],
963
+ typing.Any,
960
964
  parse_obj_as(
961
- type_=typing.Optional[typing.Any], # type: ignore
965
+ type_=typing.Any, # type: ignore
962
966
  object_=_response.json(),
963
967
  ),
964
968
  ),
@@ -967,9 +971,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
967
971
  raise InternalServerError(
968
972
  headers=dict(_response.headers),
969
973
  body=typing.cast(
970
- typing.Optional[typing.Any],
974
+ typing.Any,
971
975
  parse_obj_as(
972
- type_=typing.Optional[typing.Any], # type: ignore
976
+ type_=typing.Any, # type: ignore
973
977
  object_=_response.json(),
974
978
  ),
975
979
  ),
@@ -978,9 +982,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
978
982
  raise ServiceUnavailableError(
979
983
  headers=dict(_response.headers),
980
984
  body=typing.cast(
981
- typing.Optional[typing.Any],
985
+ typing.Any,
982
986
  parse_obj_as(
983
- type_=typing.Optional[typing.Any], # type: ignore
987
+ type_=typing.Any, # type: ignore
984
988
  object_=_response.json(),
985
989
  ),
986
990
  ),
@@ -999,7 +1003,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
999
1003
  request_options: typing.Optional[RequestOptions] = None,
1000
1004
  ) -> AsyncHttpResponse[FilesUploadResponse]:
1001
1005
  """
1002
- Start a speech to text bulk job V1
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
  ----------
@@ -1048,9 +1052,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1048
1052
  raise BadRequestError(
1049
1053
  headers=dict(_response.headers),
1050
1054
  body=typing.cast(
1051
- typing.Optional[typing.Any],
1055
+ typing.Any,
1052
1056
  parse_obj_as(
1053
- type_=typing.Optional[typing.Any], # type: ignore
1057
+ type_=typing.Any, # type: ignore
1054
1058
  object_=_response.json(),
1055
1059
  ),
1056
1060
  ),
@@ -1059,9 +1063,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1059
1063
  raise ForbiddenError(
1060
1064
  headers=dict(_response.headers),
1061
1065
  body=typing.cast(
1062
- typing.Optional[typing.Any],
1066
+ typing.Any,
1063
1067
  parse_obj_as(
1064
- type_=typing.Optional[typing.Any], # type: ignore
1068
+ type_=typing.Any, # type: ignore
1065
1069
  object_=_response.json(),
1066
1070
  ),
1067
1071
  ),
@@ -1070,9 +1074,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1070
1074
  raise UnprocessableEntityError(
1071
1075
  headers=dict(_response.headers),
1072
1076
  body=typing.cast(
1073
- typing.Optional[typing.Any],
1077
+ typing.Any,
1074
1078
  parse_obj_as(
1075
- type_=typing.Optional[typing.Any], # type: ignore
1079
+ type_=typing.Any, # type: ignore
1076
1080
  object_=_response.json(),
1077
1081
  ),
1078
1082
  ),
@@ -1081,9 +1085,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1081
1085
  raise TooManyRequestsError(
1082
1086
  headers=dict(_response.headers),
1083
1087
  body=typing.cast(
1084
- typing.Optional[typing.Any],
1088
+ typing.Any,
1085
1089
  parse_obj_as(
1086
- type_=typing.Optional[typing.Any], # type: ignore
1090
+ type_=typing.Any, # type: ignore
1087
1091
  object_=_response.json(),
1088
1092
  ),
1089
1093
  ),
@@ -1092,9 +1096,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1092
1096
  raise InternalServerError(
1093
1097
  headers=dict(_response.headers),
1094
1098
  body=typing.cast(
1095
- typing.Optional[typing.Any],
1099
+ typing.Any,
1096
1100
  parse_obj_as(
1097
- type_=typing.Optional[typing.Any], # type: ignore
1101
+ type_=typing.Any, # type: ignore
1098
1102
  object_=_response.json(),
1099
1103
  ),
1100
1104
  ),
@@ -1103,9 +1107,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1103
1107
  raise ServiceUnavailableError(
1104
1108
  headers=dict(_response.headers),
1105
1109
  body=typing.cast(
1106
- typing.Optional[typing.Any],
1110
+ typing.Any,
1107
1111
  parse_obj_as(
1108
- type_=typing.Optional[typing.Any], # type: ignore
1112
+ type_=typing.Any, # type: ignore
1109
1113
  object_=_response.json(),
1110
1114
  ),
1111
1115
  ),
@@ -1124,7 +1128,7 @@ class AsyncRawSpeechToTextTranslateJobClient:
1124
1128
  request_options: typing.Optional[RequestOptions] = None,
1125
1129
  ) -> AsyncHttpResponse[FilesDownloadResponse]:
1126
1130
  """
1127
- Start a speech to text bulk job V1
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
  ----------
@@ -1173,9 +1177,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1173
1177
  raise BadRequestError(
1174
1178
  headers=dict(_response.headers),
1175
1179
  body=typing.cast(
1176
- typing.Optional[typing.Any],
1180
+ typing.Any,
1177
1181
  parse_obj_as(
1178
- type_=typing.Optional[typing.Any], # type: ignore
1182
+ type_=typing.Any, # type: ignore
1179
1183
  object_=_response.json(),
1180
1184
  ),
1181
1185
  ),
@@ -1184,9 +1188,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1184
1188
  raise ForbiddenError(
1185
1189
  headers=dict(_response.headers),
1186
1190
  body=typing.cast(
1187
- typing.Optional[typing.Any],
1191
+ typing.Any,
1188
1192
  parse_obj_as(
1189
- type_=typing.Optional[typing.Any], # type: ignore
1193
+ type_=typing.Any, # type: ignore
1190
1194
  object_=_response.json(),
1191
1195
  ),
1192
1196
  ),
@@ -1195,9 +1199,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1195
1199
  raise UnprocessableEntityError(
1196
1200
  headers=dict(_response.headers),
1197
1201
  body=typing.cast(
1198
- typing.Optional[typing.Any],
1202
+ typing.Any,
1199
1203
  parse_obj_as(
1200
- type_=typing.Optional[typing.Any], # type: ignore
1204
+ type_=typing.Any, # type: ignore
1201
1205
  object_=_response.json(),
1202
1206
  ),
1203
1207
  ),
@@ -1206,9 +1210,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1206
1210
  raise TooManyRequestsError(
1207
1211
  headers=dict(_response.headers),
1208
1212
  body=typing.cast(
1209
- typing.Optional[typing.Any],
1213
+ typing.Any,
1210
1214
  parse_obj_as(
1211
- type_=typing.Optional[typing.Any], # type: ignore
1215
+ type_=typing.Any, # type: ignore
1212
1216
  object_=_response.json(),
1213
1217
  ),
1214
1218
  ),
@@ -1217,9 +1221,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1217
1221
  raise InternalServerError(
1218
1222
  headers=dict(_response.headers),
1219
1223
  body=typing.cast(
1220
- typing.Optional[typing.Any],
1224
+ typing.Any,
1221
1225
  parse_obj_as(
1222
- type_=typing.Optional[typing.Any], # type: ignore
1226
+ type_=typing.Any, # type: ignore
1223
1227
  object_=_response.json(),
1224
1228
  ),
1225
1229
  ),
@@ -1228,9 +1232,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1228
1232
  raise ServiceUnavailableError(
1229
1233
  headers=dict(_response.headers),
1230
1234
  body=typing.cast(
1231
- typing.Optional[typing.Any],
1235
+ typing.Any,
1232
1236
  parse_obj_as(
1233
- type_=typing.Optional[typing.Any], # type: ignore
1237
+ type_=typing.Any, # type: ignore
1234
1238
  object_=_response.json(),
1235
1239
  ),
1236
1240
  ),