camb-sdk 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of camb-sdk might be problematic. Click here for more details.

Files changed (64) hide show
  1. camb_sdk-1.0.0.dist-info/METADATA +266 -0
  2. camb_sdk-1.0.0.dist-info/RECORD +64 -0
  3. camb_sdk-1.0.0.dist-info/WHEEL +5 -0
  4. camb_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
  5. camb_sdk-1.0.0.dist-info/top_level.txt +1 -0
  6. cambai/__init__.py +145 -0
  7. cambai/api/__init__.py +12 -0
  8. cambai/api/apis_api.py +10291 -0
  9. cambai/api/audio_separation_api.py +837 -0
  10. cambai/api/dictionaries_api.py +286 -0
  11. cambai/api/dub_api.py +906 -0
  12. cambai/api/stories_api.py +1511 -0
  13. cambai/api/text_to_audio_api.py +835 -0
  14. cambai/api/text_to_speech_api.py +574 -0
  15. cambai/api/text_to_voice_api.py +840 -0
  16. cambai/api_client.py +801 -0
  17. cambai/api_response.py +21 -0
  18. cambai/configuration.py +603 -0
  19. cambai/exceptions.py +216 -0
  20. cambai/models/__init__.py +58 -0
  21. cambai/models/audio_output_file_url_response.py +87 -0
  22. cambai/models/audio_output_type.py +39 -0
  23. cambai/models/audio_separation_run_info_response.py +89 -0
  24. cambai/models/body_translate_translate_post.py +103 -0
  25. cambai/models/create_api_key_request_payload.py +89 -0
  26. cambai/models/create_custom_voice_out.py +87 -0
  27. cambai/models/create_text_to_audio_request_payload.py +89 -0
  28. cambai/models/create_text_to_voice_request_payload.py +89 -0
  29. cambai/models/create_translated_story_request_payload.py +88 -0
  30. cambai/models/create_translated_tts_request_payload.py +120 -0
  31. cambai/models/create_translation_stream_request_payload.py +108 -0
  32. cambai/models/create_tts_request_payload.py +102 -0
  33. cambai/models/create_tts_stream_request_payload.py +100 -0
  34. cambai/models/dialogue_item.py +93 -0
  35. cambai/models/dictionary.py +96 -0
  36. cambai/models/dub_alt_format_response_body.py +92 -0
  37. cambai/models/dubbed_output_in_alt_format_request_payload.py +91 -0
  38. cambai/models/end_to_end_dubbing_request_payload.py +99 -0
  39. cambai/models/expire_api_key_request_payload.py +87 -0
  40. cambai/models/formalities.py +37 -0
  41. cambai/models/gender.py +39 -0
  42. cambai/models/http_validation_error.py +95 -0
  43. cambai/models/language_item.py +91 -0
  44. cambai/models/languages.py +183 -0
  45. cambai/models/orchestrator_pipeline_result.py +95 -0
  46. cambai/models/output_api_key.py +105 -0
  47. cambai/models/output_format.py +134 -0
  48. cambai/models/output_type.py +37 -0
  49. cambai/models/request_dubbed_output_in_alt_format200_response.py +137 -0
  50. cambai/models/run_info_response.py +101 -0
  51. cambai/models/story_run_info_response.py +99 -0
  52. cambai/models/task_id.py +87 -0
  53. cambai/models/task_status.py +40 -0
  54. cambai/models/text_to_voice_run_info_response.py +87 -0
  55. cambai/models/transcript_data_type.py +37 -0
  56. cambai/models/transcript_file_format.py +38 -0
  57. cambai/models/translation_result.py +87 -0
  58. cambai/models/tts_stream_output_format.py +40 -0
  59. cambai/models/validation_error.py +99 -0
  60. cambai/models/validation_error_loc_inner.py +138 -0
  61. cambai/models/video_output_type_without_avi.py +38 -0
  62. cambai/models/voice_item.py +102 -0
  63. cambai/py.typed +0 -0
  64. cambai/rest.py +258 -0
cambai/api/dub_api.py ADDED
@@ -0,0 +1,906 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from cambai.models.dubbed_output_in_alt_format_request_payload import DubbedOutputInAltFormatRequestPayload
23
+ from cambai.models.languages import Languages
24
+ from cambai.models.request_dubbed_output_in_alt_format200_response import RequestDubbedOutputInAltFormat200Response
25
+ from cambai.models.task_status import TaskStatus
26
+ from cambai.models.transcript_data_type import TranscriptDataType
27
+ from cambai.models.transcript_file_format import TranscriptFileFormat
28
+
29
+ from cambai.api_client import ApiClient, RequestSerialized
30
+ from cambai.api_response import ApiResponse
31
+ from cambai.rest import RESTResponseType
32
+
33
+
34
+ class DubApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def get_dubbed_output_in_alt_format_status_by_id(
49
+ self,
50
+ task_id: StrictStr,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> TaskStatus:
64
+ """Get Dubbed Output in Alt Format Status
65
+
66
+
67
+ :param task_id: (required)
68
+ :type task_id: str
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._get_dubbed_output_in_alt_format_status_by_id_serialize(
92
+ task_id=task_id,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "TaskStatus",
101
+ '422': "ValidationError",
102
+ }
103
+ response_data = self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ def get_dubbed_output_in_alt_format_status_by_id_with_http_info(
116
+ self,
117
+ task_id: StrictStr,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[TaskStatus]:
131
+ """Get Dubbed Output in Alt Format Status
132
+
133
+
134
+ :param task_id: (required)
135
+ :type task_id: str
136
+ :param _request_timeout: timeout setting for this request. If one
137
+ number provided, it will be total request
138
+ timeout. It can also be a pair (tuple) of
139
+ (connection, read) timeouts.
140
+ :type _request_timeout: int, tuple(int, int), optional
141
+ :param _request_auth: set to override the auth_settings for an a single
142
+ request; this effectively ignores the
143
+ authentication in the spec for a single request.
144
+ :type _request_auth: dict, optional
145
+ :param _content_type: force content-type for the request.
146
+ :type _content_type: str, Optional
147
+ :param _headers: set to override the headers for a single
148
+ request; this effectively ignores the headers
149
+ in the spec for a single request.
150
+ :type _headers: dict, optional
151
+ :param _host_index: set to override the host_index for a single
152
+ request; this effectively ignores the host_index
153
+ in the spec for a single request.
154
+ :type _host_index: int, optional
155
+ :return: Returns the result object.
156
+ """ # noqa: E501
157
+
158
+ _param = self._get_dubbed_output_in_alt_format_status_by_id_serialize(
159
+ task_id=task_id,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index
164
+ )
165
+
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ '200': "TaskStatus",
168
+ '422': "ValidationError",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
179
+
180
+
181
+ @validate_call
182
+ def get_dubbed_output_in_alt_format_status_by_id_without_preload_content(
183
+ self,
184
+ task_id: StrictStr,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
191
+ ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """Get Dubbed Output in Alt Format Status
199
+
200
+
201
+ :param task_id: (required)
202
+ :type task_id: str
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._get_dubbed_output_in_alt_format_status_by_id_serialize(
226
+ task_id=task_id,
227
+ _request_auth=_request_auth,
228
+ _content_type=_content_type,
229
+ _headers=_headers,
230
+ _host_index=_host_index
231
+ )
232
+
233
+ _response_types_map: Dict[str, Optional[str]] = {
234
+ '200': "TaskStatus",
235
+ '422': "ValidationError",
236
+ }
237
+ response_data = self.api_client.call_api(
238
+ *_param,
239
+ _request_timeout=_request_timeout
240
+ )
241
+ return response_data.response
242
+
243
+
244
+ def _get_dubbed_output_in_alt_format_status_by_id_serialize(
245
+ self,
246
+ task_id,
247
+ _request_auth,
248
+ _content_type,
249
+ _headers,
250
+ _host_index,
251
+ ) -> RequestSerialized:
252
+
253
+ _host = None
254
+
255
+ _collection_formats: Dict[str, str] = {
256
+ }
257
+
258
+ _path_params: Dict[str, str] = {}
259
+ _query_params: List[Tuple[str, str]] = []
260
+ _header_params: Dict[str, Optional[str]] = _headers or {}
261
+ _form_params: List[Tuple[str, str]] = []
262
+ _files: Dict[
263
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
264
+ ] = {}
265
+ _body_params: Optional[bytes] = None
266
+
267
+ # process the path parameters
268
+ if task_id is not None:
269
+ _path_params['task_id'] = task_id
270
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+
275
+
276
+ # set the HTTP header `Accept`
277
+ if 'Accept' not in _header_params:
278
+ _header_params['Accept'] = self.api_client.select_header_accept(
279
+ [
280
+ 'application/json'
281
+ ]
282
+ )
283
+
284
+
285
+ # authentication setting
286
+ _auth_settings: List[str] = [
287
+ 'APIKeyHeader'
288
+ ]
289
+
290
+ return self.api_client.param_serialize(
291
+ method='GET',
292
+ resource_path='/dub-alt-format/{task_id}',
293
+ path_params=_path_params,
294
+ query_params=_query_params,
295
+ header_params=_header_params,
296
+ body=_body_params,
297
+ post_params=_form_params,
298
+ files=_files,
299
+ auth_settings=_auth_settings,
300
+ collection_formats=_collection_formats,
301
+ _host=_host,
302
+ _request_auth=_request_auth
303
+ )
304
+
305
+
306
+
307
+
308
+ @validate_call
309
+ def get_dubbed_run_transcript(
310
+ self,
311
+ run_id: StrictInt,
312
+ language: Languages,
313
+ format_type: Annotated[Optional[TranscriptFileFormat], Field(description="The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.")] = None,
314
+ data_type: Annotated[Optional[TranscriptDataType], Field(description="The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.")] = None,
315
+ _request_timeout: Union[
316
+ None,
317
+ Annotated[StrictFloat, Field(gt=0)],
318
+ Tuple[
319
+ Annotated[StrictFloat, Field(gt=0)],
320
+ Annotated[StrictFloat, Field(gt=0)]
321
+ ]
322
+ ] = None,
323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
324
+ _content_type: Optional[StrictStr] = None,
325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
327
+ ) -> None:
328
+ """Get Dubbed Run Transcript
329
+
330
+
331
+ :param run_id: (required)
332
+ :type run_id: int
333
+ :param language: (required)
334
+ :type language: Languages
335
+ :param format_type: The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.
336
+ :type format_type: TranscriptFileFormat
337
+ :param data_type: The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.
338
+ :type data_type: TranscriptDataType
339
+ :param _request_timeout: timeout setting for this request. If one
340
+ number provided, it will be total request
341
+ timeout. It can also be a pair (tuple) of
342
+ (connection, read) timeouts.
343
+ :type _request_timeout: int, tuple(int, int), optional
344
+ :param _request_auth: set to override the auth_settings for an a single
345
+ request; this effectively ignores the
346
+ authentication in the spec for a single request.
347
+ :type _request_auth: dict, optional
348
+ :param _content_type: force content-type for the request.
349
+ :type _content_type: str, Optional
350
+ :param _headers: set to override the headers for a single
351
+ request; this effectively ignores the headers
352
+ in the spec for a single request.
353
+ :type _headers: dict, optional
354
+ :param _host_index: set to override the host_index for a single
355
+ request; this effectively ignores the host_index
356
+ in the spec for a single request.
357
+ :type _host_index: int, optional
358
+ :return: Returns the result object.
359
+ """ # noqa: E501
360
+
361
+ _param = self._get_dubbed_run_transcript_serialize(
362
+ run_id=run_id,
363
+ language=language,
364
+ format_type=format_type,
365
+ data_type=data_type,
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ }
374
+ response_data = self.api_client.call_api(
375
+ *_param,
376
+ _request_timeout=_request_timeout
377
+ )
378
+ response_data.read()
379
+ return self.api_client.response_deserialize(
380
+ response_data=response_data,
381
+ response_types_map=_response_types_map,
382
+ ).data
383
+
384
+
385
+ @validate_call
386
+ def get_dubbed_run_transcript_with_http_info(
387
+ self,
388
+ run_id: StrictInt,
389
+ language: Languages,
390
+ format_type: Annotated[Optional[TranscriptFileFormat], Field(description="The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.")] = None,
391
+ data_type: Annotated[Optional[TranscriptDataType], Field(description="The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.")] = None,
392
+ _request_timeout: Union[
393
+ None,
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Tuple[
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Annotated[StrictFloat, Field(gt=0)]
398
+ ]
399
+ ] = None,
400
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
401
+ _content_type: Optional[StrictStr] = None,
402
+ _headers: Optional[Dict[StrictStr, Any]] = None,
403
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
404
+ ) -> ApiResponse[None]:
405
+ """Get Dubbed Run Transcript
406
+
407
+
408
+ :param run_id: (required)
409
+ :type run_id: int
410
+ :param language: (required)
411
+ :type language: Languages
412
+ :param format_type: The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.
413
+ :type format_type: TranscriptFileFormat
414
+ :param data_type: The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.
415
+ :type data_type: TranscriptDataType
416
+ :param _request_timeout: timeout setting for this request. If one
417
+ number provided, it will be total request
418
+ timeout. It can also be a pair (tuple) of
419
+ (connection, read) timeouts.
420
+ :type _request_timeout: int, tuple(int, int), optional
421
+ :param _request_auth: set to override the auth_settings for an a single
422
+ request; this effectively ignores the
423
+ authentication in the spec for a single request.
424
+ :type _request_auth: dict, optional
425
+ :param _content_type: force content-type for the request.
426
+ :type _content_type: str, Optional
427
+ :param _headers: set to override the headers for a single
428
+ request; this effectively ignores the headers
429
+ in the spec for a single request.
430
+ :type _headers: dict, optional
431
+ :param _host_index: set to override the host_index for a single
432
+ request; this effectively ignores the host_index
433
+ in the spec for a single request.
434
+ :type _host_index: int, optional
435
+ :return: Returns the result object.
436
+ """ # noqa: E501
437
+
438
+ _param = self._get_dubbed_run_transcript_serialize(
439
+ run_id=run_id,
440
+ language=language,
441
+ format_type=format_type,
442
+ data_type=data_type,
443
+ _request_auth=_request_auth,
444
+ _content_type=_content_type,
445
+ _headers=_headers,
446
+ _host_index=_host_index
447
+ )
448
+
449
+ _response_types_map: Dict[str, Optional[str]] = {
450
+ }
451
+ response_data = self.api_client.call_api(
452
+ *_param,
453
+ _request_timeout=_request_timeout
454
+ )
455
+ response_data.read()
456
+ return self.api_client.response_deserialize(
457
+ response_data=response_data,
458
+ response_types_map=_response_types_map,
459
+ )
460
+
461
+
462
+ @validate_call
463
+ def get_dubbed_run_transcript_without_preload_content(
464
+ self,
465
+ run_id: StrictInt,
466
+ language: Languages,
467
+ format_type: Annotated[Optional[TranscriptFileFormat], Field(description="The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.")] = None,
468
+ data_type: Annotated[Optional[TranscriptDataType], Field(description="The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.")] = None,
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Annotated[StrictFloat, Field(gt=0)]
475
+ ]
476
+ ] = None,
477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
478
+ _content_type: Optional[StrictStr] = None,
479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
481
+ ) -> RESTResponseType:
482
+ """Get Dubbed Run Transcript
483
+
484
+
485
+ :param run_id: (required)
486
+ :type run_id: int
487
+ :param language: (required)
488
+ :type language: Languages
489
+ :param format_type: The format to use for the transcription output. Either `srt`, `vtt` or `txt`. Defaults to `txt`.
490
+ :type format_type: TranscriptFileFormat
491
+ :param data_type: The data type for the transcription being returned. Returns the raw data of the transcription or a presigned url for the file that contains the transcript contents in the specified format.
492
+ :type data_type: TranscriptDataType
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._get_dubbed_run_transcript_serialize(
516
+ run_id=run_id,
517
+ language=language,
518
+ format_type=format_type,
519
+ data_type=data_type,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index
524
+ )
525
+
526
+ _response_types_map: Dict[str, Optional[str]] = {
527
+ }
528
+ response_data = self.api_client.call_api(
529
+ *_param,
530
+ _request_timeout=_request_timeout
531
+ )
532
+ return response_data.response
533
+
534
+
535
+ def _get_dubbed_run_transcript_serialize(
536
+ self,
537
+ run_id,
538
+ language,
539
+ format_type,
540
+ data_type,
541
+ _request_auth,
542
+ _content_type,
543
+ _headers,
544
+ _host_index,
545
+ ) -> RequestSerialized:
546
+
547
+ _host = None
548
+
549
+ _collection_formats: Dict[str, str] = {
550
+ }
551
+
552
+ _path_params: Dict[str, str] = {}
553
+ _query_params: List[Tuple[str, str]] = []
554
+ _header_params: Dict[str, Optional[str]] = _headers or {}
555
+ _form_params: List[Tuple[str, str]] = []
556
+ _files: Dict[
557
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
558
+ ] = {}
559
+ _body_params: Optional[bytes] = None
560
+
561
+ # process the path parameters
562
+ if run_id is not None:
563
+ _path_params['run_id'] = run_id
564
+ if language is not None:
565
+ _path_params['language'] = language.value
566
+ # process the query parameters
567
+ if format_type is not None:
568
+
569
+ _query_params.append(('format_type', format_type.value))
570
+
571
+ if data_type is not None:
572
+
573
+ _query_params.append(('data_type', data_type.value))
574
+
575
+ # process the header parameters
576
+ # process the form parameters
577
+ # process the body parameter
578
+
579
+
580
+
581
+
582
+ # authentication setting
583
+ _auth_settings: List[str] = [
584
+ 'APIKeyHeader'
585
+ ]
586
+
587
+ return self.api_client.param_serialize(
588
+ method='GET',
589
+ resource_path='/transcript/{run_id}/{language}',
590
+ path_params=_path_params,
591
+ query_params=_query_params,
592
+ header_params=_header_params,
593
+ body=_body_params,
594
+ post_params=_form_params,
595
+ files=_files,
596
+ auth_settings=_auth_settings,
597
+ collection_formats=_collection_formats,
598
+ _host=_host,
599
+ _request_auth=_request_auth
600
+ )
601
+
602
+
603
+
604
+
605
+ @validate_call
606
+ def request_dubbed_output_in_alt_format(
607
+ self,
608
+ run_id: StrictInt,
609
+ language: Languages,
610
+ dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload,
611
+ _request_timeout: Union[
612
+ None,
613
+ Annotated[StrictFloat, Field(gt=0)],
614
+ Tuple[
615
+ Annotated[StrictFloat, Field(gt=0)],
616
+ Annotated[StrictFloat, Field(gt=0)]
617
+ ]
618
+ ] = None,
619
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
620
+ _content_type: Optional[StrictStr] = None,
621
+ _headers: Optional[Dict[StrictStr, Any]] = None,
622
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
623
+ ) -> RequestDubbedOutputInAltFormat200Response:
624
+ """Get Dubbed Output in Alt Format
625
+
626
+
627
+ :param run_id: (required)
628
+ :type run_id: int
629
+ :param language: (required)
630
+ :type language: Languages
631
+ :param dubbed_output_in_alt_format_request_payload: (required)
632
+ :type dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._request_dubbed_output_in_alt_format_serialize(
656
+ run_id=run_id,
657
+ language=language,
658
+ dubbed_output_in_alt_format_request_payload=dubbed_output_in_alt_format_request_payload,
659
+ _request_auth=_request_auth,
660
+ _content_type=_content_type,
661
+ _headers=_headers,
662
+ _host_index=_host_index
663
+ )
664
+
665
+ _response_types_map: Dict[str, Optional[str]] = {
666
+ '200': "RequestDubbedOutputInAltFormat200Response",
667
+ '422': "HTTPValidationError",
668
+ }
669
+ response_data = self.api_client.call_api(
670
+ *_param,
671
+ _request_timeout=_request_timeout
672
+ )
673
+ response_data.read()
674
+ return self.api_client.response_deserialize(
675
+ response_data=response_data,
676
+ response_types_map=_response_types_map,
677
+ ).data
678
+
679
+
680
+ @validate_call
681
+ def request_dubbed_output_in_alt_format_with_http_info(
682
+ self,
683
+ run_id: StrictInt,
684
+ language: Languages,
685
+ dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload,
686
+ _request_timeout: Union[
687
+ None,
688
+ Annotated[StrictFloat, Field(gt=0)],
689
+ Tuple[
690
+ Annotated[StrictFloat, Field(gt=0)],
691
+ Annotated[StrictFloat, Field(gt=0)]
692
+ ]
693
+ ] = None,
694
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
695
+ _content_type: Optional[StrictStr] = None,
696
+ _headers: Optional[Dict[StrictStr, Any]] = None,
697
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
698
+ ) -> ApiResponse[RequestDubbedOutputInAltFormat200Response]:
699
+ """Get Dubbed Output in Alt Format
700
+
701
+
702
+ :param run_id: (required)
703
+ :type run_id: int
704
+ :param language: (required)
705
+ :type language: Languages
706
+ :param dubbed_output_in_alt_format_request_payload: (required)
707
+ :type dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload
708
+ :param _request_timeout: timeout setting for this request. If one
709
+ number provided, it will be total request
710
+ timeout. It can also be a pair (tuple) of
711
+ (connection, read) timeouts.
712
+ :type _request_timeout: int, tuple(int, int), optional
713
+ :param _request_auth: set to override the auth_settings for an a single
714
+ request; this effectively ignores the
715
+ authentication in the spec for a single request.
716
+ :type _request_auth: dict, optional
717
+ :param _content_type: force content-type for the request.
718
+ :type _content_type: str, Optional
719
+ :param _headers: set to override the headers for a single
720
+ request; this effectively ignores the headers
721
+ in the spec for a single request.
722
+ :type _headers: dict, optional
723
+ :param _host_index: set to override the host_index for a single
724
+ request; this effectively ignores the host_index
725
+ in the spec for a single request.
726
+ :type _host_index: int, optional
727
+ :return: Returns the result object.
728
+ """ # noqa: E501
729
+
730
+ _param = self._request_dubbed_output_in_alt_format_serialize(
731
+ run_id=run_id,
732
+ language=language,
733
+ dubbed_output_in_alt_format_request_payload=dubbed_output_in_alt_format_request_payload,
734
+ _request_auth=_request_auth,
735
+ _content_type=_content_type,
736
+ _headers=_headers,
737
+ _host_index=_host_index
738
+ )
739
+
740
+ _response_types_map: Dict[str, Optional[str]] = {
741
+ '200': "RequestDubbedOutputInAltFormat200Response",
742
+ '422': "HTTPValidationError",
743
+ }
744
+ response_data = self.api_client.call_api(
745
+ *_param,
746
+ _request_timeout=_request_timeout
747
+ )
748
+ response_data.read()
749
+ return self.api_client.response_deserialize(
750
+ response_data=response_data,
751
+ response_types_map=_response_types_map,
752
+ )
753
+
754
+
755
+ @validate_call
756
+ def request_dubbed_output_in_alt_format_without_preload_content(
757
+ self,
758
+ run_id: StrictInt,
759
+ language: Languages,
760
+ dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload,
761
+ _request_timeout: Union[
762
+ None,
763
+ Annotated[StrictFloat, Field(gt=0)],
764
+ Tuple[
765
+ Annotated[StrictFloat, Field(gt=0)],
766
+ Annotated[StrictFloat, Field(gt=0)]
767
+ ]
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> RESTResponseType:
774
+ """Get Dubbed Output in Alt Format
775
+
776
+
777
+ :param run_id: (required)
778
+ :type run_id: int
779
+ :param language: (required)
780
+ :type language: Languages
781
+ :param dubbed_output_in_alt_format_request_payload: (required)
782
+ :type dubbed_output_in_alt_format_request_payload: DubbedOutputInAltFormatRequestPayload
783
+ :param _request_timeout: timeout setting for this request. If one
784
+ number provided, it will be total request
785
+ timeout. It can also be a pair (tuple) of
786
+ (connection, read) timeouts.
787
+ :type _request_timeout: int, tuple(int, int), optional
788
+ :param _request_auth: set to override the auth_settings for an a single
789
+ request; this effectively ignores the
790
+ authentication in the spec for a single request.
791
+ :type _request_auth: dict, optional
792
+ :param _content_type: force content-type for the request.
793
+ :type _content_type: str, Optional
794
+ :param _headers: set to override the headers for a single
795
+ request; this effectively ignores the headers
796
+ in the spec for a single request.
797
+ :type _headers: dict, optional
798
+ :param _host_index: set to override the host_index for a single
799
+ request; this effectively ignores the host_index
800
+ in the spec for a single request.
801
+ :type _host_index: int, optional
802
+ :return: Returns the result object.
803
+ """ # noqa: E501
804
+
805
+ _param = self._request_dubbed_output_in_alt_format_serialize(
806
+ run_id=run_id,
807
+ language=language,
808
+ dubbed_output_in_alt_format_request_payload=dubbed_output_in_alt_format_request_payload,
809
+ _request_auth=_request_auth,
810
+ _content_type=_content_type,
811
+ _headers=_headers,
812
+ _host_index=_host_index
813
+ )
814
+
815
+ _response_types_map: Dict[str, Optional[str]] = {
816
+ '200': "RequestDubbedOutputInAltFormat200Response",
817
+ '422': "HTTPValidationError",
818
+ }
819
+ response_data = self.api_client.call_api(
820
+ *_param,
821
+ _request_timeout=_request_timeout
822
+ )
823
+ return response_data.response
824
+
825
+
826
+ def _request_dubbed_output_in_alt_format_serialize(
827
+ self,
828
+ run_id,
829
+ language,
830
+ dubbed_output_in_alt_format_request_payload,
831
+ _request_auth,
832
+ _content_type,
833
+ _headers,
834
+ _host_index,
835
+ ) -> RequestSerialized:
836
+
837
+ _host = None
838
+
839
+ _collection_formats: Dict[str, str] = {
840
+ }
841
+
842
+ _path_params: Dict[str, str] = {}
843
+ _query_params: List[Tuple[str, str]] = []
844
+ _header_params: Dict[str, Optional[str]] = _headers or {}
845
+ _form_params: List[Tuple[str, str]] = []
846
+ _files: Dict[
847
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
848
+ ] = {}
849
+ _body_params: Optional[bytes] = None
850
+
851
+ # process the path parameters
852
+ if run_id is not None:
853
+ _path_params['run_id'] = run_id
854
+ if language is not None:
855
+ _path_params['language'] = language.value
856
+ # process the query parameters
857
+ # process the header parameters
858
+ # process the form parameters
859
+ # process the body parameter
860
+ if dubbed_output_in_alt_format_request_payload is not None:
861
+ _body_params = dubbed_output_in_alt_format_request_payload
862
+
863
+
864
+ # set the HTTP header `Accept`
865
+ if 'Accept' not in _header_params:
866
+ _header_params['Accept'] = self.api_client.select_header_accept(
867
+ [
868
+ 'application/json'
869
+ ]
870
+ )
871
+
872
+ # set the HTTP header `Content-Type`
873
+ if _content_type:
874
+ _header_params['Content-Type'] = _content_type
875
+ else:
876
+ _default_content_type = (
877
+ self.api_client.select_header_content_type(
878
+ [
879
+ 'application/json'
880
+ ]
881
+ )
882
+ )
883
+ if _default_content_type is not None:
884
+ _header_params['Content-Type'] = _default_content_type
885
+
886
+ # authentication setting
887
+ _auth_settings: List[str] = [
888
+ 'APIKeyHeader'
889
+ ]
890
+
891
+ return self.api_client.param_serialize(
892
+ method='POST',
893
+ resource_path='/dub-alt-format/{run_id}/{language}',
894
+ path_params=_path_params,
895
+ query_params=_query_params,
896
+ header_params=_header_params,
897
+ body=_body_params,
898
+ post_params=_form_params,
899
+ files=_files,
900
+ auth_settings=_auth_settings,
901
+ collection_formats=_collection_formats,
902
+ _host=_host,
903
+ _request_auth=_request_auth
904
+ )
905
+
906
+