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.
- sarvamai/__init__.py +405 -206
- sarvamai/chat/raw_client.py +20 -20
- sarvamai/client.py +186 -34
- sarvamai/core/__init__.py +76 -21
- sarvamai/core/client_wrapper.py +19 -3
- sarvamai/core/force_multipart.py +4 -2
- sarvamai/core/http_client.py +217 -97
- sarvamai/core/http_response.py +1 -1
- sarvamai/core/http_sse/__init__.py +42 -0
- sarvamai/core/http_sse/_api.py +112 -0
- sarvamai/core/http_sse/_decoders.py +61 -0
- sarvamai/core/http_sse/_exceptions.py +7 -0
- sarvamai/core/http_sse/_models.py +17 -0
- sarvamai/core/jsonable_encoder.py +8 -0
- sarvamai/core/pydantic_utilities.py +110 -4
- sarvamai/errors/__init__.py +40 -6
- sarvamai/errors/bad_request_error.py +1 -1
- sarvamai/errors/forbidden_error.py +1 -1
- sarvamai/errors/internal_server_error.py +1 -1
- sarvamai/errors/service_unavailable_error.py +1 -1
- sarvamai/errors/too_many_requests_error.py +1 -1
- sarvamai/errors/unprocessable_entity_error.py +1 -1
- sarvamai/requests/__init__.py +150 -62
- sarvamai/requests/audio_data.py +0 -6
- sarvamai/requests/error_response_data.py +1 -1
- sarvamai/requests/file_signed_url_details.py +1 -1
- sarvamai/requests/speech_to_text_transcription_data.py +2 -8
- sarvamai/requests/speech_to_text_translate_transcription_data.py +0 -6
- sarvamai/speech_to_text/raw_client.py +54 -52
- sarvamai/speech_to_text_job/job.py +100 -2
- sarvamai/speech_to_text_job/raw_client.py +134 -130
- sarvamai/speech_to_text_streaming/__init__.py +38 -10
- sarvamai/speech_to_text_streaming/client.py +0 -44
- sarvamai/speech_to_text_streaming/raw_client.py +0 -44
- sarvamai/speech_to_text_streaming/types/__init__.py +36 -8
- sarvamai/speech_to_text_translate_job/job.py +100 -2
- sarvamai/speech_to_text_translate_job/raw_client.py +134 -130
- sarvamai/speech_to_text_translate_streaming/__init__.py +36 -9
- sarvamai/speech_to_text_translate_streaming/client.py +0 -44
- sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -44
- sarvamai/speech_to_text_translate_streaming/types/__init__.py +36 -9
- sarvamai/text/client.py +0 -12
- sarvamai/text/raw_client.py +60 -72
- sarvamai/text_to_speech/client.py +18 -0
- sarvamai/text_to_speech/raw_client.py +38 -20
- sarvamai/text_to_speech_streaming/__init__.py +28 -1
- sarvamai/text_to_speech_streaming/types/__init__.py +30 -1
- sarvamai/types/__init__.py +222 -102
- sarvamai/types/audio_data.py +0 -6
- sarvamai/types/chat_completion_request_message.py +6 -2
- sarvamai/types/completion_event_flag.py +3 -1
- sarvamai/types/error_response_data.py +1 -1
- sarvamai/types/file_signed_url_details.py +1 -1
- sarvamai/types/speech_to_text_transcription_data.py +2 -8
- sarvamai/types/speech_to_text_translate_transcription_data.py +0 -6
- {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/METADATA +2 -1
- {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/RECORD +58 -59
- sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +0 -33
- sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_stream_ongoing_speech_results.py +0 -5
- sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +0 -33
- sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_stream_ongoing_speech_results.py +0 -5
- sarvamai/types/audio_data_input_audio_codec.py +0 -33
- sarvamai/types/response_speech_state.py +0 -7
- {sarvamai-0.1.22a3.dist-info → sarvamai-0.1.23a1.dist-info}/WHEEL +0 -0
|
@@ -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
|
----------
|
|
@@ -89,9 +89,9 @@ class RawSpeechToTextJobClient:
|
|
|
89
89
|
raise BadRequestError(
|
|
90
90
|
headers=dict(_response.headers),
|
|
91
91
|
body=typing.cast(
|
|
92
|
-
typing.
|
|
92
|
+
typing.Any,
|
|
93
93
|
parse_obj_as(
|
|
94
|
-
type_=typing.
|
|
94
|
+
type_=typing.Any, # type: ignore
|
|
95
95
|
object_=_response.json(),
|
|
96
96
|
),
|
|
97
97
|
),
|
|
@@ -100,9 +100,9 @@ class RawSpeechToTextJobClient:
|
|
|
100
100
|
raise ForbiddenError(
|
|
101
101
|
headers=dict(_response.headers),
|
|
102
102
|
body=typing.cast(
|
|
103
|
-
typing.
|
|
103
|
+
typing.Any,
|
|
104
104
|
parse_obj_as(
|
|
105
|
-
type_=typing.
|
|
105
|
+
type_=typing.Any, # type: ignore
|
|
106
106
|
object_=_response.json(),
|
|
107
107
|
),
|
|
108
108
|
),
|
|
@@ -111,9 +111,9 @@ class RawSpeechToTextJobClient:
|
|
|
111
111
|
raise UnprocessableEntityError(
|
|
112
112
|
headers=dict(_response.headers),
|
|
113
113
|
body=typing.cast(
|
|
114
|
-
typing.
|
|
114
|
+
typing.Any,
|
|
115
115
|
parse_obj_as(
|
|
116
|
-
type_=typing.
|
|
116
|
+
type_=typing.Any, # type: ignore
|
|
117
117
|
object_=_response.json(),
|
|
118
118
|
),
|
|
119
119
|
),
|
|
@@ -122,9 +122,9 @@ class RawSpeechToTextJobClient:
|
|
|
122
122
|
raise TooManyRequestsError(
|
|
123
123
|
headers=dict(_response.headers),
|
|
124
124
|
body=typing.cast(
|
|
125
|
-
typing.
|
|
125
|
+
typing.Any,
|
|
126
126
|
parse_obj_as(
|
|
127
|
-
type_=typing.
|
|
127
|
+
type_=typing.Any, # type: ignore
|
|
128
128
|
object_=_response.json(),
|
|
129
129
|
),
|
|
130
130
|
),
|
|
@@ -133,9 +133,9 @@ class RawSpeechToTextJobClient:
|
|
|
133
133
|
raise InternalServerError(
|
|
134
134
|
headers=dict(_response.headers),
|
|
135
135
|
body=typing.cast(
|
|
136
|
-
typing.
|
|
136
|
+
typing.Any,
|
|
137
137
|
parse_obj_as(
|
|
138
|
-
type_=typing.
|
|
138
|
+
type_=typing.Any, # type: ignore
|
|
139
139
|
object_=_response.json(),
|
|
140
140
|
),
|
|
141
141
|
),
|
|
@@ -144,9 +144,9 @@ class RawSpeechToTextJobClient:
|
|
|
144
144
|
raise ServiceUnavailableError(
|
|
145
145
|
headers=dict(_response.headers),
|
|
146
146
|
body=typing.cast(
|
|
147
|
-
typing.
|
|
147
|
+
typing.Any,
|
|
148
148
|
parse_obj_as(
|
|
149
|
-
type_=typing.
|
|
149
|
+
type_=typing.Any, # type: ignore
|
|
150
150
|
object_=_response.json(),
|
|
151
151
|
),
|
|
152
152
|
),
|
|
@@ -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
|
----------
|
|
@@ -195,9 +197,9 @@ class RawSpeechToTextJobClient:
|
|
|
195
197
|
raise BadRequestError(
|
|
196
198
|
headers=dict(_response.headers),
|
|
197
199
|
body=typing.cast(
|
|
198
|
-
typing.
|
|
200
|
+
typing.Any,
|
|
199
201
|
parse_obj_as(
|
|
200
|
-
type_=typing.
|
|
202
|
+
type_=typing.Any, # type: ignore
|
|
201
203
|
object_=_response.json(),
|
|
202
204
|
),
|
|
203
205
|
),
|
|
@@ -206,9 +208,9 @@ class RawSpeechToTextJobClient:
|
|
|
206
208
|
raise ForbiddenError(
|
|
207
209
|
headers=dict(_response.headers),
|
|
208
210
|
body=typing.cast(
|
|
209
|
-
typing.
|
|
211
|
+
typing.Any,
|
|
210
212
|
parse_obj_as(
|
|
211
|
-
type_=typing.
|
|
213
|
+
type_=typing.Any, # type: ignore
|
|
212
214
|
object_=_response.json(),
|
|
213
215
|
),
|
|
214
216
|
),
|
|
@@ -217,9 +219,9 @@ class RawSpeechToTextJobClient:
|
|
|
217
219
|
raise UnprocessableEntityError(
|
|
218
220
|
headers=dict(_response.headers),
|
|
219
221
|
body=typing.cast(
|
|
220
|
-
typing.
|
|
222
|
+
typing.Any,
|
|
221
223
|
parse_obj_as(
|
|
222
|
-
type_=typing.
|
|
224
|
+
type_=typing.Any, # type: ignore
|
|
223
225
|
object_=_response.json(),
|
|
224
226
|
),
|
|
225
227
|
),
|
|
@@ -228,9 +230,9 @@ class RawSpeechToTextJobClient:
|
|
|
228
230
|
raise TooManyRequestsError(
|
|
229
231
|
headers=dict(_response.headers),
|
|
230
232
|
body=typing.cast(
|
|
231
|
-
typing.
|
|
233
|
+
typing.Any,
|
|
232
234
|
parse_obj_as(
|
|
233
|
-
type_=typing.
|
|
235
|
+
type_=typing.Any, # type: ignore
|
|
234
236
|
object_=_response.json(),
|
|
235
237
|
),
|
|
236
238
|
),
|
|
@@ -239,9 +241,9 @@ class RawSpeechToTextJobClient:
|
|
|
239
241
|
raise InternalServerError(
|
|
240
242
|
headers=dict(_response.headers),
|
|
241
243
|
body=typing.cast(
|
|
242
|
-
typing.
|
|
244
|
+
typing.Any,
|
|
243
245
|
parse_obj_as(
|
|
244
|
-
type_=typing.
|
|
246
|
+
type_=typing.Any, # type: ignore
|
|
245
247
|
object_=_response.json(),
|
|
246
248
|
),
|
|
247
249
|
),
|
|
@@ -250,9 +252,9 @@ class RawSpeechToTextJobClient:
|
|
|
250
252
|
raise ServiceUnavailableError(
|
|
251
253
|
headers=dict(_response.headers),
|
|
252
254
|
body=typing.cast(
|
|
253
|
-
typing.
|
|
255
|
+
typing.Any,
|
|
254
256
|
parse_obj_as(
|
|
255
|
-
type_=typing.
|
|
257
|
+
type_=typing.Any, # type: ignore
|
|
256
258
|
object_=_response.json(),
|
|
257
259
|
),
|
|
258
260
|
),
|
|
@@ -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
|
----------
|
|
@@ -310,9 +312,9 @@ class RawSpeechToTextJobClient:
|
|
|
310
312
|
raise BadRequestError(
|
|
311
313
|
headers=dict(_response.headers),
|
|
312
314
|
body=typing.cast(
|
|
313
|
-
typing.
|
|
315
|
+
typing.Any,
|
|
314
316
|
parse_obj_as(
|
|
315
|
-
type_=typing.
|
|
317
|
+
type_=typing.Any, # type: ignore
|
|
316
318
|
object_=_response.json(),
|
|
317
319
|
),
|
|
318
320
|
),
|
|
@@ -321,9 +323,9 @@ class RawSpeechToTextJobClient:
|
|
|
321
323
|
raise ForbiddenError(
|
|
322
324
|
headers=dict(_response.headers),
|
|
323
325
|
body=typing.cast(
|
|
324
|
-
typing.
|
|
326
|
+
typing.Any,
|
|
325
327
|
parse_obj_as(
|
|
326
|
-
type_=typing.
|
|
328
|
+
type_=typing.Any, # type: ignore
|
|
327
329
|
object_=_response.json(),
|
|
328
330
|
),
|
|
329
331
|
),
|
|
@@ -332,9 +334,9 @@ class RawSpeechToTextJobClient:
|
|
|
332
334
|
raise UnprocessableEntityError(
|
|
333
335
|
headers=dict(_response.headers),
|
|
334
336
|
body=typing.cast(
|
|
335
|
-
typing.
|
|
337
|
+
typing.Any,
|
|
336
338
|
parse_obj_as(
|
|
337
|
-
type_=typing.
|
|
339
|
+
type_=typing.Any, # type: ignore
|
|
338
340
|
object_=_response.json(),
|
|
339
341
|
),
|
|
340
342
|
),
|
|
@@ -343,9 +345,9 @@ class RawSpeechToTextJobClient:
|
|
|
343
345
|
raise TooManyRequestsError(
|
|
344
346
|
headers=dict(_response.headers),
|
|
345
347
|
body=typing.cast(
|
|
346
|
-
typing.
|
|
348
|
+
typing.Any,
|
|
347
349
|
parse_obj_as(
|
|
348
|
-
type_=typing.
|
|
350
|
+
type_=typing.Any, # type: ignore
|
|
349
351
|
object_=_response.json(),
|
|
350
352
|
),
|
|
351
353
|
),
|
|
@@ -354,9 +356,9 @@ class RawSpeechToTextJobClient:
|
|
|
354
356
|
raise InternalServerError(
|
|
355
357
|
headers=dict(_response.headers),
|
|
356
358
|
body=typing.cast(
|
|
357
|
-
typing.
|
|
359
|
+
typing.Any,
|
|
358
360
|
parse_obj_as(
|
|
359
|
-
type_=typing.
|
|
361
|
+
type_=typing.Any, # type: ignore
|
|
360
362
|
object_=_response.json(),
|
|
361
363
|
),
|
|
362
364
|
),
|
|
@@ -365,9 +367,9 @@ class RawSpeechToTextJobClient:
|
|
|
365
367
|
raise ServiceUnavailableError(
|
|
366
368
|
headers=dict(_response.headers),
|
|
367
369
|
body=typing.cast(
|
|
368
|
-
typing.
|
|
370
|
+
typing.Any,
|
|
369
371
|
parse_obj_as(
|
|
370
|
-
type_=typing.
|
|
372
|
+
type_=typing.Any, # type: ignore
|
|
371
373
|
object_=_response.json(),
|
|
372
374
|
),
|
|
373
375
|
),
|
|
@@ -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
|
----------
|
|
@@ -425,9 +427,9 @@ class RawSpeechToTextJobClient:
|
|
|
425
427
|
raise BadRequestError(
|
|
426
428
|
headers=dict(_response.headers),
|
|
427
429
|
body=typing.cast(
|
|
428
|
-
typing.
|
|
430
|
+
typing.Any,
|
|
429
431
|
parse_obj_as(
|
|
430
|
-
type_=typing.
|
|
432
|
+
type_=typing.Any, # type: ignore
|
|
431
433
|
object_=_response.json(),
|
|
432
434
|
),
|
|
433
435
|
),
|
|
@@ -436,9 +438,9 @@ class RawSpeechToTextJobClient:
|
|
|
436
438
|
raise ForbiddenError(
|
|
437
439
|
headers=dict(_response.headers),
|
|
438
440
|
body=typing.cast(
|
|
439
|
-
typing.
|
|
441
|
+
typing.Any,
|
|
440
442
|
parse_obj_as(
|
|
441
|
-
type_=typing.
|
|
443
|
+
type_=typing.Any, # type: ignore
|
|
442
444
|
object_=_response.json(),
|
|
443
445
|
),
|
|
444
446
|
),
|
|
@@ -447,9 +449,9 @@ class RawSpeechToTextJobClient:
|
|
|
447
449
|
raise UnprocessableEntityError(
|
|
448
450
|
headers=dict(_response.headers),
|
|
449
451
|
body=typing.cast(
|
|
450
|
-
typing.
|
|
452
|
+
typing.Any,
|
|
451
453
|
parse_obj_as(
|
|
452
|
-
type_=typing.
|
|
454
|
+
type_=typing.Any, # type: ignore
|
|
453
455
|
object_=_response.json(),
|
|
454
456
|
),
|
|
455
457
|
),
|
|
@@ -458,9 +460,9 @@ class RawSpeechToTextJobClient:
|
|
|
458
460
|
raise TooManyRequestsError(
|
|
459
461
|
headers=dict(_response.headers),
|
|
460
462
|
body=typing.cast(
|
|
461
|
-
typing.
|
|
463
|
+
typing.Any,
|
|
462
464
|
parse_obj_as(
|
|
463
|
-
type_=typing.
|
|
465
|
+
type_=typing.Any, # type: ignore
|
|
464
466
|
object_=_response.json(),
|
|
465
467
|
),
|
|
466
468
|
),
|
|
@@ -469,9 +471,9 @@ class RawSpeechToTextJobClient:
|
|
|
469
471
|
raise InternalServerError(
|
|
470
472
|
headers=dict(_response.headers),
|
|
471
473
|
body=typing.cast(
|
|
472
|
-
typing.
|
|
474
|
+
typing.Any,
|
|
473
475
|
parse_obj_as(
|
|
474
|
-
type_=typing.
|
|
476
|
+
type_=typing.Any, # type: ignore
|
|
475
477
|
object_=_response.json(),
|
|
476
478
|
),
|
|
477
479
|
),
|
|
@@ -480,9 +482,9 @@ class RawSpeechToTextJobClient:
|
|
|
480
482
|
raise ServiceUnavailableError(
|
|
481
483
|
headers=dict(_response.headers),
|
|
482
484
|
body=typing.cast(
|
|
483
|
-
typing.
|
|
485
|
+
typing.Any,
|
|
484
486
|
parse_obj_as(
|
|
485
|
-
type_=typing.
|
|
487
|
+
type_=typing.Any, # type: ignore
|
|
486
488
|
object_=_response.json(),
|
|
487
489
|
),
|
|
488
490
|
),
|
|
@@ -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
|
----------
|
|
@@ -540,9 +542,9 @@ class RawSpeechToTextJobClient:
|
|
|
540
542
|
raise BadRequestError(
|
|
541
543
|
headers=dict(_response.headers),
|
|
542
544
|
body=typing.cast(
|
|
543
|
-
typing.
|
|
545
|
+
typing.Any,
|
|
544
546
|
parse_obj_as(
|
|
545
|
-
type_=typing.
|
|
547
|
+
type_=typing.Any, # type: ignore
|
|
546
548
|
object_=_response.json(),
|
|
547
549
|
),
|
|
548
550
|
),
|
|
@@ -551,9 +553,9 @@ class RawSpeechToTextJobClient:
|
|
|
551
553
|
raise ForbiddenError(
|
|
552
554
|
headers=dict(_response.headers),
|
|
553
555
|
body=typing.cast(
|
|
554
|
-
typing.
|
|
556
|
+
typing.Any,
|
|
555
557
|
parse_obj_as(
|
|
556
|
-
type_=typing.
|
|
558
|
+
type_=typing.Any, # type: ignore
|
|
557
559
|
object_=_response.json(),
|
|
558
560
|
),
|
|
559
561
|
),
|
|
@@ -562,9 +564,9 @@ class RawSpeechToTextJobClient:
|
|
|
562
564
|
raise UnprocessableEntityError(
|
|
563
565
|
headers=dict(_response.headers),
|
|
564
566
|
body=typing.cast(
|
|
565
|
-
typing.
|
|
567
|
+
typing.Any,
|
|
566
568
|
parse_obj_as(
|
|
567
|
-
type_=typing.
|
|
569
|
+
type_=typing.Any, # type: ignore
|
|
568
570
|
object_=_response.json(),
|
|
569
571
|
),
|
|
570
572
|
),
|
|
@@ -573,9 +575,9 @@ class RawSpeechToTextJobClient:
|
|
|
573
575
|
raise TooManyRequestsError(
|
|
574
576
|
headers=dict(_response.headers),
|
|
575
577
|
body=typing.cast(
|
|
576
|
-
typing.
|
|
578
|
+
typing.Any,
|
|
577
579
|
parse_obj_as(
|
|
578
|
-
type_=typing.
|
|
580
|
+
type_=typing.Any, # type: ignore
|
|
579
581
|
object_=_response.json(),
|
|
580
582
|
),
|
|
581
583
|
),
|
|
@@ -584,9 +586,9 @@ class RawSpeechToTextJobClient:
|
|
|
584
586
|
raise InternalServerError(
|
|
585
587
|
headers=dict(_response.headers),
|
|
586
588
|
body=typing.cast(
|
|
587
|
-
typing.
|
|
589
|
+
typing.Any,
|
|
588
590
|
parse_obj_as(
|
|
589
|
-
type_=typing.
|
|
591
|
+
type_=typing.Any, # type: ignore
|
|
590
592
|
object_=_response.json(),
|
|
591
593
|
),
|
|
592
594
|
),
|
|
@@ -595,9 +597,9 @@ class RawSpeechToTextJobClient:
|
|
|
595
597
|
raise ServiceUnavailableError(
|
|
596
598
|
headers=dict(_response.headers),
|
|
597
599
|
body=typing.cast(
|
|
598
|
-
typing.
|
|
600
|
+
typing.Any,
|
|
599
601
|
parse_obj_as(
|
|
600
|
-
type_=typing.
|
|
602
|
+
type_=typing.Any, # type: ignore
|
|
601
603
|
object_=_response.json(),
|
|
602
604
|
),
|
|
603
605
|
),
|
|
@@ -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
|
----------
|
|
@@ -670,9 +672,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
670
672
|
raise BadRequestError(
|
|
671
673
|
headers=dict(_response.headers),
|
|
672
674
|
body=typing.cast(
|
|
673
|
-
typing.
|
|
675
|
+
typing.Any,
|
|
674
676
|
parse_obj_as(
|
|
675
|
-
type_=typing.
|
|
677
|
+
type_=typing.Any, # type: ignore
|
|
676
678
|
object_=_response.json(),
|
|
677
679
|
),
|
|
678
680
|
),
|
|
@@ -681,9 +683,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
681
683
|
raise ForbiddenError(
|
|
682
684
|
headers=dict(_response.headers),
|
|
683
685
|
body=typing.cast(
|
|
684
|
-
typing.
|
|
686
|
+
typing.Any,
|
|
685
687
|
parse_obj_as(
|
|
686
|
-
type_=typing.
|
|
688
|
+
type_=typing.Any, # type: ignore
|
|
687
689
|
object_=_response.json(),
|
|
688
690
|
),
|
|
689
691
|
),
|
|
@@ -692,9 +694,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
692
694
|
raise UnprocessableEntityError(
|
|
693
695
|
headers=dict(_response.headers),
|
|
694
696
|
body=typing.cast(
|
|
695
|
-
typing.
|
|
697
|
+
typing.Any,
|
|
696
698
|
parse_obj_as(
|
|
697
|
-
type_=typing.
|
|
699
|
+
type_=typing.Any, # type: ignore
|
|
698
700
|
object_=_response.json(),
|
|
699
701
|
),
|
|
700
702
|
),
|
|
@@ -703,9 +705,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
703
705
|
raise TooManyRequestsError(
|
|
704
706
|
headers=dict(_response.headers),
|
|
705
707
|
body=typing.cast(
|
|
706
|
-
typing.
|
|
708
|
+
typing.Any,
|
|
707
709
|
parse_obj_as(
|
|
708
|
-
type_=typing.
|
|
710
|
+
type_=typing.Any, # type: ignore
|
|
709
711
|
object_=_response.json(),
|
|
710
712
|
),
|
|
711
713
|
),
|
|
@@ -714,9 +716,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
714
716
|
raise InternalServerError(
|
|
715
717
|
headers=dict(_response.headers),
|
|
716
718
|
body=typing.cast(
|
|
717
|
-
typing.
|
|
719
|
+
typing.Any,
|
|
718
720
|
parse_obj_as(
|
|
719
|
-
type_=typing.
|
|
721
|
+
type_=typing.Any, # type: ignore
|
|
720
722
|
object_=_response.json(),
|
|
721
723
|
),
|
|
722
724
|
),
|
|
@@ -725,9 +727,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
725
727
|
raise ServiceUnavailableError(
|
|
726
728
|
headers=dict(_response.headers),
|
|
727
729
|
body=typing.cast(
|
|
728
|
-
typing.
|
|
730
|
+
typing.Any,
|
|
729
731
|
parse_obj_as(
|
|
730
|
-
type_=typing.
|
|
732
|
+
type_=typing.Any, # type: ignore
|
|
731
733
|
object_=_response.json(),
|
|
732
734
|
),
|
|
733
735
|
),
|
|
@@ -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
|
----------
|
|
@@ -776,9 +780,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
776
780
|
raise BadRequestError(
|
|
777
781
|
headers=dict(_response.headers),
|
|
778
782
|
body=typing.cast(
|
|
779
|
-
typing.
|
|
783
|
+
typing.Any,
|
|
780
784
|
parse_obj_as(
|
|
781
|
-
type_=typing.
|
|
785
|
+
type_=typing.Any, # type: ignore
|
|
782
786
|
object_=_response.json(),
|
|
783
787
|
),
|
|
784
788
|
),
|
|
@@ -787,9 +791,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
787
791
|
raise ForbiddenError(
|
|
788
792
|
headers=dict(_response.headers),
|
|
789
793
|
body=typing.cast(
|
|
790
|
-
typing.
|
|
794
|
+
typing.Any,
|
|
791
795
|
parse_obj_as(
|
|
792
|
-
type_=typing.
|
|
796
|
+
type_=typing.Any, # type: ignore
|
|
793
797
|
object_=_response.json(),
|
|
794
798
|
),
|
|
795
799
|
),
|
|
@@ -798,9 +802,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
798
802
|
raise UnprocessableEntityError(
|
|
799
803
|
headers=dict(_response.headers),
|
|
800
804
|
body=typing.cast(
|
|
801
|
-
typing.
|
|
805
|
+
typing.Any,
|
|
802
806
|
parse_obj_as(
|
|
803
|
-
type_=typing.
|
|
807
|
+
type_=typing.Any, # type: ignore
|
|
804
808
|
object_=_response.json(),
|
|
805
809
|
),
|
|
806
810
|
),
|
|
@@ -809,9 +813,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
809
813
|
raise TooManyRequestsError(
|
|
810
814
|
headers=dict(_response.headers),
|
|
811
815
|
body=typing.cast(
|
|
812
|
-
typing.
|
|
816
|
+
typing.Any,
|
|
813
817
|
parse_obj_as(
|
|
814
|
-
type_=typing.
|
|
818
|
+
type_=typing.Any, # type: ignore
|
|
815
819
|
object_=_response.json(),
|
|
816
820
|
),
|
|
817
821
|
),
|
|
@@ -820,9 +824,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
820
824
|
raise InternalServerError(
|
|
821
825
|
headers=dict(_response.headers),
|
|
822
826
|
body=typing.cast(
|
|
823
|
-
typing.
|
|
827
|
+
typing.Any,
|
|
824
828
|
parse_obj_as(
|
|
825
|
-
type_=typing.
|
|
829
|
+
type_=typing.Any, # type: ignore
|
|
826
830
|
object_=_response.json(),
|
|
827
831
|
),
|
|
828
832
|
),
|
|
@@ -831,9 +835,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
831
835
|
raise ServiceUnavailableError(
|
|
832
836
|
headers=dict(_response.headers),
|
|
833
837
|
body=typing.cast(
|
|
834
|
-
typing.
|
|
838
|
+
typing.Any,
|
|
835
839
|
parse_obj_as(
|
|
836
|
-
type_=typing.
|
|
840
|
+
type_=typing.Any, # type: ignore
|
|
837
841
|
object_=_response.json(),
|
|
838
842
|
),
|
|
839
843
|
),
|
|
@@ -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
|
----------
|
|
@@ -891,9 +895,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
891
895
|
raise BadRequestError(
|
|
892
896
|
headers=dict(_response.headers),
|
|
893
897
|
body=typing.cast(
|
|
894
|
-
typing.
|
|
898
|
+
typing.Any,
|
|
895
899
|
parse_obj_as(
|
|
896
|
-
type_=typing.
|
|
900
|
+
type_=typing.Any, # type: ignore
|
|
897
901
|
object_=_response.json(),
|
|
898
902
|
),
|
|
899
903
|
),
|
|
@@ -902,9 +906,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
902
906
|
raise ForbiddenError(
|
|
903
907
|
headers=dict(_response.headers),
|
|
904
908
|
body=typing.cast(
|
|
905
|
-
typing.
|
|
909
|
+
typing.Any,
|
|
906
910
|
parse_obj_as(
|
|
907
|
-
type_=typing.
|
|
911
|
+
type_=typing.Any, # type: ignore
|
|
908
912
|
object_=_response.json(),
|
|
909
913
|
),
|
|
910
914
|
),
|
|
@@ -913,9 +917,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
913
917
|
raise UnprocessableEntityError(
|
|
914
918
|
headers=dict(_response.headers),
|
|
915
919
|
body=typing.cast(
|
|
916
|
-
typing.
|
|
920
|
+
typing.Any,
|
|
917
921
|
parse_obj_as(
|
|
918
|
-
type_=typing.
|
|
922
|
+
type_=typing.Any, # type: ignore
|
|
919
923
|
object_=_response.json(),
|
|
920
924
|
),
|
|
921
925
|
),
|
|
@@ -924,9 +928,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
924
928
|
raise TooManyRequestsError(
|
|
925
929
|
headers=dict(_response.headers),
|
|
926
930
|
body=typing.cast(
|
|
927
|
-
typing.
|
|
931
|
+
typing.Any,
|
|
928
932
|
parse_obj_as(
|
|
929
|
-
type_=typing.
|
|
933
|
+
type_=typing.Any, # type: ignore
|
|
930
934
|
object_=_response.json(),
|
|
931
935
|
),
|
|
932
936
|
),
|
|
@@ -935,9 +939,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
935
939
|
raise InternalServerError(
|
|
936
940
|
headers=dict(_response.headers),
|
|
937
941
|
body=typing.cast(
|
|
938
|
-
typing.
|
|
942
|
+
typing.Any,
|
|
939
943
|
parse_obj_as(
|
|
940
|
-
type_=typing.
|
|
944
|
+
type_=typing.Any, # type: ignore
|
|
941
945
|
object_=_response.json(),
|
|
942
946
|
),
|
|
943
947
|
),
|
|
@@ -946,9 +950,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
946
950
|
raise ServiceUnavailableError(
|
|
947
951
|
headers=dict(_response.headers),
|
|
948
952
|
body=typing.cast(
|
|
949
|
-
typing.
|
|
953
|
+
typing.Any,
|
|
950
954
|
parse_obj_as(
|
|
951
|
-
type_=typing.
|
|
955
|
+
type_=typing.Any, # type: ignore
|
|
952
956
|
object_=_response.json(),
|
|
953
957
|
),
|
|
954
958
|
),
|
|
@@ -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
|
----------
|
|
@@ -1006,9 +1010,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1006
1010
|
raise BadRequestError(
|
|
1007
1011
|
headers=dict(_response.headers),
|
|
1008
1012
|
body=typing.cast(
|
|
1009
|
-
typing.
|
|
1013
|
+
typing.Any,
|
|
1010
1014
|
parse_obj_as(
|
|
1011
|
-
type_=typing.
|
|
1015
|
+
type_=typing.Any, # type: ignore
|
|
1012
1016
|
object_=_response.json(),
|
|
1013
1017
|
),
|
|
1014
1018
|
),
|
|
@@ -1017,9 +1021,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1017
1021
|
raise ForbiddenError(
|
|
1018
1022
|
headers=dict(_response.headers),
|
|
1019
1023
|
body=typing.cast(
|
|
1020
|
-
typing.
|
|
1024
|
+
typing.Any,
|
|
1021
1025
|
parse_obj_as(
|
|
1022
|
-
type_=typing.
|
|
1026
|
+
type_=typing.Any, # type: ignore
|
|
1023
1027
|
object_=_response.json(),
|
|
1024
1028
|
),
|
|
1025
1029
|
),
|
|
@@ -1028,9 +1032,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1028
1032
|
raise UnprocessableEntityError(
|
|
1029
1033
|
headers=dict(_response.headers),
|
|
1030
1034
|
body=typing.cast(
|
|
1031
|
-
typing.
|
|
1035
|
+
typing.Any,
|
|
1032
1036
|
parse_obj_as(
|
|
1033
|
-
type_=typing.
|
|
1037
|
+
type_=typing.Any, # type: ignore
|
|
1034
1038
|
object_=_response.json(),
|
|
1035
1039
|
),
|
|
1036
1040
|
),
|
|
@@ -1039,9 +1043,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1039
1043
|
raise TooManyRequestsError(
|
|
1040
1044
|
headers=dict(_response.headers),
|
|
1041
1045
|
body=typing.cast(
|
|
1042
|
-
typing.
|
|
1046
|
+
typing.Any,
|
|
1043
1047
|
parse_obj_as(
|
|
1044
|
-
type_=typing.
|
|
1048
|
+
type_=typing.Any, # type: ignore
|
|
1045
1049
|
object_=_response.json(),
|
|
1046
1050
|
),
|
|
1047
1051
|
),
|
|
@@ -1050,9 +1054,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1050
1054
|
raise InternalServerError(
|
|
1051
1055
|
headers=dict(_response.headers),
|
|
1052
1056
|
body=typing.cast(
|
|
1053
|
-
typing.
|
|
1057
|
+
typing.Any,
|
|
1054
1058
|
parse_obj_as(
|
|
1055
|
-
type_=typing.
|
|
1059
|
+
type_=typing.Any, # type: ignore
|
|
1056
1060
|
object_=_response.json(),
|
|
1057
1061
|
),
|
|
1058
1062
|
),
|
|
@@ -1061,9 +1065,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1061
1065
|
raise ServiceUnavailableError(
|
|
1062
1066
|
headers=dict(_response.headers),
|
|
1063
1067
|
body=typing.cast(
|
|
1064
|
-
typing.
|
|
1068
|
+
typing.Any,
|
|
1065
1069
|
parse_obj_as(
|
|
1066
|
-
type_=typing.
|
|
1070
|
+
type_=typing.Any, # type: ignore
|
|
1067
1071
|
object_=_response.json(),
|
|
1068
1072
|
),
|
|
1069
1073
|
),
|
|
@@ -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
|
----------
|
|
@@ -1121,9 +1125,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1121
1125
|
raise BadRequestError(
|
|
1122
1126
|
headers=dict(_response.headers),
|
|
1123
1127
|
body=typing.cast(
|
|
1124
|
-
typing.
|
|
1128
|
+
typing.Any,
|
|
1125
1129
|
parse_obj_as(
|
|
1126
|
-
type_=typing.
|
|
1130
|
+
type_=typing.Any, # type: ignore
|
|
1127
1131
|
object_=_response.json(),
|
|
1128
1132
|
),
|
|
1129
1133
|
),
|
|
@@ -1132,9 +1136,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1132
1136
|
raise ForbiddenError(
|
|
1133
1137
|
headers=dict(_response.headers),
|
|
1134
1138
|
body=typing.cast(
|
|
1135
|
-
typing.
|
|
1139
|
+
typing.Any,
|
|
1136
1140
|
parse_obj_as(
|
|
1137
|
-
type_=typing.
|
|
1141
|
+
type_=typing.Any, # type: ignore
|
|
1138
1142
|
object_=_response.json(),
|
|
1139
1143
|
),
|
|
1140
1144
|
),
|
|
@@ -1143,9 +1147,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1143
1147
|
raise UnprocessableEntityError(
|
|
1144
1148
|
headers=dict(_response.headers),
|
|
1145
1149
|
body=typing.cast(
|
|
1146
|
-
typing.
|
|
1150
|
+
typing.Any,
|
|
1147
1151
|
parse_obj_as(
|
|
1148
|
-
type_=typing.
|
|
1152
|
+
type_=typing.Any, # type: ignore
|
|
1149
1153
|
object_=_response.json(),
|
|
1150
1154
|
),
|
|
1151
1155
|
),
|
|
@@ -1154,9 +1158,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1154
1158
|
raise TooManyRequestsError(
|
|
1155
1159
|
headers=dict(_response.headers),
|
|
1156
1160
|
body=typing.cast(
|
|
1157
|
-
typing.
|
|
1161
|
+
typing.Any,
|
|
1158
1162
|
parse_obj_as(
|
|
1159
|
-
type_=typing.
|
|
1163
|
+
type_=typing.Any, # type: ignore
|
|
1160
1164
|
object_=_response.json(),
|
|
1161
1165
|
),
|
|
1162
1166
|
),
|
|
@@ -1165,9 +1169,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1165
1169
|
raise InternalServerError(
|
|
1166
1170
|
headers=dict(_response.headers),
|
|
1167
1171
|
body=typing.cast(
|
|
1168
|
-
typing.
|
|
1172
|
+
typing.Any,
|
|
1169
1173
|
parse_obj_as(
|
|
1170
|
-
type_=typing.
|
|
1174
|
+
type_=typing.Any, # type: ignore
|
|
1171
1175
|
object_=_response.json(),
|
|
1172
1176
|
),
|
|
1173
1177
|
),
|
|
@@ -1176,9 +1180,9 @@ class AsyncRawSpeechToTextJobClient:
|
|
|
1176
1180
|
raise ServiceUnavailableError(
|
|
1177
1181
|
headers=dict(_response.headers),
|
|
1178
1182
|
body=typing.cast(
|
|
1179
|
-
typing.
|
|
1183
|
+
typing.Any,
|
|
1180
1184
|
parse_obj_as(
|
|
1181
|
-
type_=typing.
|
|
1185
|
+
type_=typing.Any, # type: ignore
|
|
1182
1186
|
object_=_response.json(),
|
|
1183
1187
|
),
|
|
1184
1188
|
),
|