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
@@ -0,0 +1,840 @@
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_extensions import Annotated
21
+ from cambai.models.create_text_to_voice_request_payload import CreateTextToVoiceRequestPayload
22
+ from cambai.models.orchestrator_pipeline_result import OrchestratorPipelineResult
23
+ from cambai.models.task_id import TaskID
24
+ from cambai.models.text_to_voice_run_info_response import TextToVoiceRunInfoResponse
25
+
26
+ from cambai.api_client import ApiClient, RequestSerialized
27
+ from cambai.api_response import ApiResponse
28
+ from cambai.rest import RESTResponseType
29
+
30
+
31
+ class TextToVoiceApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def create_voice_from_description(
46
+ self,
47
+ create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> TaskID:
61
+ """Create Voice from Description
62
+
63
+
64
+ :param create_text_to_voice_request_payload: (required)
65
+ :type create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._create_voice_from_description_serialize(
89
+ create_text_to_voice_request_payload=create_text_to_voice_request_payload,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "TaskID",
98
+ '422': "HTTPValidationError",
99
+ }
100
+ response_data = self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ def create_voice_from_description_with_http_info(
113
+ self,
114
+ create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[TaskID]:
128
+ """Create Voice from Description
129
+
130
+
131
+ :param create_text_to_voice_request_payload: (required)
132
+ :type create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload
133
+ :param _request_timeout: timeout setting for this request. If one
134
+ number provided, it will be total request
135
+ timeout. It can also be a pair (tuple) of
136
+ (connection, read) timeouts.
137
+ :type _request_timeout: int, tuple(int, int), optional
138
+ :param _request_auth: set to override the auth_settings for an a single
139
+ request; this effectively ignores the
140
+ authentication in the spec for a single request.
141
+ :type _request_auth: dict, optional
142
+ :param _content_type: force content-type for the request.
143
+ :type _content_type: str, Optional
144
+ :param _headers: set to override the headers for a single
145
+ request; this effectively ignores the headers
146
+ in the spec for a single request.
147
+ :type _headers: dict, optional
148
+ :param _host_index: set to override the host_index for a single
149
+ request; this effectively ignores the host_index
150
+ in the spec for a single request.
151
+ :type _host_index: int, optional
152
+ :return: Returns the result object.
153
+ """ # noqa: E501
154
+
155
+ _param = self._create_voice_from_description_serialize(
156
+ create_text_to_voice_request_payload=create_text_to_voice_request_payload,
157
+ _request_auth=_request_auth,
158
+ _content_type=_content_type,
159
+ _headers=_headers,
160
+ _host_index=_host_index
161
+ )
162
+
163
+ _response_types_map: Dict[str, Optional[str]] = {
164
+ '200': "TaskID",
165
+ '422': "HTTPValidationError",
166
+ }
167
+ response_data = self.api_client.call_api(
168
+ *_param,
169
+ _request_timeout=_request_timeout
170
+ )
171
+ response_data.read()
172
+ return self.api_client.response_deserialize(
173
+ response_data=response_data,
174
+ response_types_map=_response_types_map,
175
+ )
176
+
177
+
178
+ @validate_call
179
+ def create_voice_from_description_without_preload_content(
180
+ self,
181
+ create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload,
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Annotated[StrictFloat, Field(gt=0)]
188
+ ]
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Create Voice from Description
196
+
197
+
198
+ :param create_text_to_voice_request_payload: (required)
199
+ :type create_text_to_voice_request_payload: CreateTextToVoiceRequestPayload
200
+ :param _request_timeout: timeout setting for this request. If one
201
+ number provided, it will be total request
202
+ timeout. It can also be a pair (tuple) of
203
+ (connection, read) timeouts.
204
+ :type _request_timeout: int, tuple(int, int), optional
205
+ :param _request_auth: set to override the auth_settings for an a single
206
+ request; this effectively ignores the
207
+ authentication in the spec for a single request.
208
+ :type _request_auth: dict, optional
209
+ :param _content_type: force content-type for the request.
210
+ :type _content_type: str, Optional
211
+ :param _headers: set to override the headers for a single
212
+ request; this effectively ignores the headers
213
+ in the spec for a single request.
214
+ :type _headers: dict, optional
215
+ :param _host_index: set to override the host_index for a single
216
+ request; this effectively ignores the host_index
217
+ in the spec for a single request.
218
+ :type _host_index: int, optional
219
+ :return: Returns the result object.
220
+ """ # noqa: E501
221
+
222
+ _param = self._create_voice_from_description_serialize(
223
+ create_text_to_voice_request_payload=create_text_to_voice_request_payload,
224
+ _request_auth=_request_auth,
225
+ _content_type=_content_type,
226
+ _headers=_headers,
227
+ _host_index=_host_index
228
+ )
229
+
230
+ _response_types_map: Dict[str, Optional[str]] = {
231
+ '200': "TaskID",
232
+ '422': "HTTPValidationError",
233
+ }
234
+ response_data = self.api_client.call_api(
235
+ *_param,
236
+ _request_timeout=_request_timeout
237
+ )
238
+ return response_data.response
239
+
240
+
241
+ def _create_voice_from_description_serialize(
242
+ self,
243
+ create_text_to_voice_request_payload,
244
+ _request_auth,
245
+ _content_type,
246
+ _headers,
247
+ _host_index,
248
+ ) -> RequestSerialized:
249
+
250
+ _host = None
251
+
252
+ _collection_formats: Dict[str, str] = {
253
+ }
254
+
255
+ _path_params: Dict[str, str] = {}
256
+ _query_params: List[Tuple[str, str]] = []
257
+ _header_params: Dict[str, Optional[str]] = _headers or {}
258
+ _form_params: List[Tuple[str, str]] = []
259
+ _files: Dict[
260
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
261
+ ] = {}
262
+ _body_params: Optional[bytes] = None
263
+
264
+ # process the path parameters
265
+ # process the query parameters
266
+ # process the header parameters
267
+ # process the form parameters
268
+ # process the body parameter
269
+ if create_text_to_voice_request_payload is not None:
270
+ _body_params = create_text_to_voice_request_payload
271
+
272
+
273
+ # set the HTTP header `Accept`
274
+ if 'Accept' not in _header_params:
275
+ _header_params['Accept'] = self.api_client.select_header_accept(
276
+ [
277
+ 'application/json'
278
+ ]
279
+ )
280
+
281
+ # set the HTTP header `Content-Type`
282
+ if _content_type:
283
+ _header_params['Content-Type'] = _content_type
284
+ else:
285
+ _default_content_type = (
286
+ self.api_client.select_header_content_type(
287
+ [
288
+ 'application/json'
289
+ ]
290
+ )
291
+ )
292
+ if _default_content_type is not None:
293
+ _header_params['Content-Type'] = _default_content_type
294
+
295
+ # authentication setting
296
+ _auth_settings: List[str] = [
297
+ 'APIKeyHeader'
298
+ ]
299
+
300
+ return self.api_client.param_serialize(
301
+ method='POST',
302
+ resource_path='/text-to-voice',
303
+ path_params=_path_params,
304
+ query_params=_query_params,
305
+ header_params=_header_params,
306
+ body=_body_params,
307
+ post_params=_form_params,
308
+ files=_files,
309
+ auth_settings=_auth_settings,
310
+ collection_formats=_collection_formats,
311
+ _host=_host,
312
+ _request_auth=_request_auth
313
+ )
314
+
315
+
316
+
317
+
318
+ @validate_call
319
+ def get_text_to_voice_run_result_by_id(
320
+ self,
321
+ run_id: Annotated[StrictInt, Field(description="The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion.")],
322
+ _request_timeout: Union[
323
+ None,
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Tuple[
326
+ Annotated[StrictFloat, Field(gt=0)],
327
+ Annotated[StrictFloat, Field(gt=0)]
328
+ ]
329
+ ] = None,
330
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
331
+ _content_type: Optional[StrictStr] = None,
332
+ _headers: Optional[Dict[StrictStr, Any]] = None,
333
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
334
+ ) -> TextToVoiceRunInfoResponse:
335
+ """Get Text-to-Voice Run Result
336
+
337
+
338
+ :param run_id: The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion. (required)
339
+ :type run_id: int
340
+ :param _request_timeout: timeout setting for this request. If one
341
+ number provided, it will be total request
342
+ timeout. It can also be a pair (tuple) of
343
+ (connection, read) timeouts.
344
+ :type _request_timeout: int, tuple(int, int), optional
345
+ :param _request_auth: set to override the auth_settings for an a single
346
+ request; this effectively ignores the
347
+ authentication in the spec for a single request.
348
+ :type _request_auth: dict, optional
349
+ :param _content_type: force content-type for the request.
350
+ :type _content_type: str, Optional
351
+ :param _headers: set to override the headers for a single
352
+ request; this effectively ignores the headers
353
+ in the spec for a single request.
354
+ :type _headers: dict, optional
355
+ :param _host_index: set to override the host_index for a single
356
+ request; this effectively ignores the host_index
357
+ in the spec for a single request.
358
+ :type _host_index: int, optional
359
+ :return: Returns the result object.
360
+ """ # noqa: E501
361
+
362
+ _param = self._get_text_to_voice_run_result_by_id_serialize(
363
+ run_id=run_id,
364
+ _request_auth=_request_auth,
365
+ _content_type=_content_type,
366
+ _headers=_headers,
367
+ _host_index=_host_index
368
+ )
369
+
370
+ _response_types_map: Dict[str, Optional[str]] = {
371
+ '200': "TextToVoiceRunInfoResponse",
372
+ '422': "HTTPValidationError",
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_text_to_voice_run_result_by_id_with_http_info(
387
+ self,
388
+ run_id: Annotated[StrictInt, Field(description="The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion.")],
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Annotated[StrictFloat, Field(gt=0)]
395
+ ]
396
+ ] = None,
397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
398
+ _content_type: Optional[StrictStr] = None,
399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
401
+ ) -> ApiResponse[TextToVoiceRunInfoResponse]:
402
+ """Get Text-to-Voice Run Result
403
+
404
+
405
+ :param run_id: The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion. (required)
406
+ :type run_id: int
407
+ :param _request_timeout: timeout setting for this request. If one
408
+ number provided, it will be total request
409
+ timeout. It can also be a pair (tuple) of
410
+ (connection, read) timeouts.
411
+ :type _request_timeout: int, tuple(int, int), optional
412
+ :param _request_auth: set to override the auth_settings for an a single
413
+ request; this effectively ignores the
414
+ authentication in the spec for a single request.
415
+ :type _request_auth: dict, optional
416
+ :param _content_type: force content-type for the request.
417
+ :type _content_type: str, Optional
418
+ :param _headers: set to override the headers for a single
419
+ request; this effectively ignores the headers
420
+ in the spec for a single request.
421
+ :type _headers: dict, optional
422
+ :param _host_index: set to override the host_index for a single
423
+ request; this effectively ignores the host_index
424
+ in the spec for a single request.
425
+ :type _host_index: int, optional
426
+ :return: Returns the result object.
427
+ """ # noqa: E501
428
+
429
+ _param = self._get_text_to_voice_run_result_by_id_serialize(
430
+ run_id=run_id,
431
+ _request_auth=_request_auth,
432
+ _content_type=_content_type,
433
+ _headers=_headers,
434
+ _host_index=_host_index
435
+ )
436
+
437
+ _response_types_map: Dict[str, Optional[str]] = {
438
+ '200': "TextToVoiceRunInfoResponse",
439
+ '422': "HTTPValidationError",
440
+ }
441
+ response_data = self.api_client.call_api(
442
+ *_param,
443
+ _request_timeout=_request_timeout
444
+ )
445
+ response_data.read()
446
+ return self.api_client.response_deserialize(
447
+ response_data=response_data,
448
+ response_types_map=_response_types_map,
449
+ )
450
+
451
+
452
+ @validate_call
453
+ def get_text_to_voice_run_result_by_id_without_preload_content(
454
+ self,
455
+ run_id: Annotated[StrictInt, Field(description="The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion.")],
456
+ _request_timeout: Union[
457
+ None,
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Tuple[
460
+ Annotated[StrictFloat, Field(gt=0)],
461
+ Annotated[StrictFloat, Field(gt=0)]
462
+ ]
463
+ ] = None,
464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
465
+ _content_type: Optional[StrictStr] = None,
466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
468
+ ) -> RESTResponseType:
469
+ """Get Text-to-Voice Run Result
470
+
471
+
472
+ :param run_id: The unique identifier for the run, which was generated during the text to voice creation process and returned upon task completion. (required)
473
+ :type run_id: int
474
+ :param _request_timeout: timeout setting for this request. If one
475
+ number provided, it will be total request
476
+ timeout. It can also be a pair (tuple) of
477
+ (connection, read) timeouts.
478
+ :type _request_timeout: int, tuple(int, int), optional
479
+ :param _request_auth: set to override the auth_settings for an a single
480
+ request; this effectively ignores the
481
+ authentication in the spec for a single request.
482
+ :type _request_auth: dict, optional
483
+ :param _content_type: force content-type for the request.
484
+ :type _content_type: str, Optional
485
+ :param _headers: set to override the headers for a single
486
+ request; this effectively ignores the headers
487
+ in the spec for a single request.
488
+ :type _headers: dict, optional
489
+ :param _host_index: set to override the host_index for a single
490
+ request; this effectively ignores the host_index
491
+ in the spec for a single request.
492
+ :type _host_index: int, optional
493
+ :return: Returns the result object.
494
+ """ # noqa: E501
495
+
496
+ _param = self._get_text_to_voice_run_result_by_id_serialize(
497
+ run_id=run_id,
498
+ _request_auth=_request_auth,
499
+ _content_type=_content_type,
500
+ _headers=_headers,
501
+ _host_index=_host_index
502
+ )
503
+
504
+ _response_types_map: Dict[str, Optional[str]] = {
505
+ '200': "TextToVoiceRunInfoResponse",
506
+ '422': "HTTPValidationError",
507
+ }
508
+ response_data = self.api_client.call_api(
509
+ *_param,
510
+ _request_timeout=_request_timeout
511
+ )
512
+ return response_data.response
513
+
514
+
515
+ def _get_text_to_voice_run_result_by_id_serialize(
516
+ self,
517
+ run_id,
518
+ _request_auth,
519
+ _content_type,
520
+ _headers,
521
+ _host_index,
522
+ ) -> RequestSerialized:
523
+
524
+ _host = None
525
+
526
+ _collection_formats: Dict[str, str] = {
527
+ }
528
+
529
+ _path_params: Dict[str, str] = {}
530
+ _query_params: List[Tuple[str, str]] = []
531
+ _header_params: Dict[str, Optional[str]] = _headers or {}
532
+ _form_params: List[Tuple[str, str]] = []
533
+ _files: Dict[
534
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
535
+ ] = {}
536
+ _body_params: Optional[bytes] = None
537
+
538
+ # process the path parameters
539
+ if run_id is not None:
540
+ _path_params['run_id'] = run_id
541
+ # process the query parameters
542
+ # process the header parameters
543
+ # process the form parameters
544
+ # process the body parameter
545
+
546
+
547
+ # set the HTTP header `Accept`
548
+ if 'Accept' not in _header_params:
549
+ _header_params['Accept'] = self.api_client.select_header_accept(
550
+ [
551
+ 'application/json'
552
+ ]
553
+ )
554
+
555
+
556
+ # authentication setting
557
+ _auth_settings: List[str] = [
558
+ 'APIKeyHeader'
559
+ ]
560
+
561
+ return self.api_client.param_serialize(
562
+ method='GET',
563
+ resource_path='/text-to-voice-result/{run_id}',
564
+ path_params=_path_params,
565
+ query_params=_query_params,
566
+ header_params=_header_params,
567
+ body=_body_params,
568
+ post_params=_form_params,
569
+ files=_files,
570
+ auth_settings=_auth_settings,
571
+ collection_formats=_collection_formats,
572
+ _host=_host,
573
+ _request_auth=_request_auth
574
+ )
575
+
576
+
577
+
578
+
579
+ @validate_call
580
+ def text_to_voice_task_id_get(
581
+ self,
582
+ task_id: StrictStr,
583
+ _request_timeout: Union[
584
+ None,
585
+ Annotated[StrictFloat, Field(gt=0)],
586
+ Tuple[
587
+ Annotated[StrictFloat, Field(gt=0)],
588
+ Annotated[StrictFloat, Field(gt=0)]
589
+ ]
590
+ ] = None,
591
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
592
+ _content_type: Optional[StrictStr] = None,
593
+ _headers: Optional[Dict[StrictStr, Any]] = None,
594
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
595
+ ) -> OrchestratorPipelineResult:
596
+ """Get Text-to-Voice Task Status
597
+
598
+ Get the status of a text-to-voice task by its ID.
599
+
600
+ :param task_id: (required)
601
+ :type task_id: str
602
+ :param _request_timeout: timeout setting for this request. If one
603
+ number provided, it will be total request
604
+ timeout. It can also be a pair (tuple) of
605
+ (connection, read) timeouts.
606
+ :type _request_timeout: int, tuple(int, int), optional
607
+ :param _request_auth: set to override the auth_settings for an a single
608
+ request; this effectively ignores the
609
+ authentication in the spec for a single request.
610
+ :type _request_auth: dict, optional
611
+ :param _content_type: force content-type for the request.
612
+ :type _content_type: str, Optional
613
+ :param _headers: set to override the headers for a single
614
+ request; this effectively ignores the headers
615
+ in the spec for a single request.
616
+ :type _headers: dict, optional
617
+ :param _host_index: set to override the host_index for a single
618
+ request; this effectively ignores the host_index
619
+ in the spec for a single request.
620
+ :type _host_index: int, optional
621
+ :return: Returns the result object.
622
+ """ # noqa: E501
623
+
624
+ _param = self._text_to_voice_task_id_get_serialize(
625
+ task_id=task_id,
626
+ _request_auth=_request_auth,
627
+ _content_type=_content_type,
628
+ _headers=_headers,
629
+ _host_index=_host_index
630
+ )
631
+
632
+ _response_types_map: Dict[str, Optional[str]] = {
633
+ '200': "OrchestratorPipelineResult",
634
+ '422': "HTTPValidationError",
635
+ }
636
+ response_data = self.api_client.call_api(
637
+ *_param,
638
+ _request_timeout=_request_timeout
639
+ )
640
+ response_data.read()
641
+ return self.api_client.response_deserialize(
642
+ response_data=response_data,
643
+ response_types_map=_response_types_map,
644
+ ).data
645
+
646
+
647
+ @validate_call
648
+ def text_to_voice_task_id_get_with_http_info(
649
+ self,
650
+ task_id: StrictStr,
651
+ _request_timeout: Union[
652
+ None,
653
+ Annotated[StrictFloat, Field(gt=0)],
654
+ Tuple[
655
+ Annotated[StrictFloat, Field(gt=0)],
656
+ Annotated[StrictFloat, Field(gt=0)]
657
+ ]
658
+ ] = None,
659
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
660
+ _content_type: Optional[StrictStr] = None,
661
+ _headers: Optional[Dict[StrictStr, Any]] = None,
662
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
663
+ ) -> ApiResponse[OrchestratorPipelineResult]:
664
+ """Get Text-to-Voice Task Status
665
+
666
+ Get the status of a text-to-voice task by its ID.
667
+
668
+ :param task_id: (required)
669
+ :type task_id: str
670
+ :param _request_timeout: timeout setting for this request. If one
671
+ number provided, it will be total request
672
+ timeout. It can also be a pair (tuple) of
673
+ (connection, read) timeouts.
674
+ :type _request_timeout: int, tuple(int, int), optional
675
+ :param _request_auth: set to override the auth_settings for an a single
676
+ request; this effectively ignores the
677
+ authentication in the spec for a single request.
678
+ :type _request_auth: dict, optional
679
+ :param _content_type: force content-type for the request.
680
+ :type _content_type: str, Optional
681
+ :param _headers: set to override the headers for a single
682
+ request; this effectively ignores the headers
683
+ in the spec for a single request.
684
+ :type _headers: dict, optional
685
+ :param _host_index: set to override the host_index for a single
686
+ request; this effectively ignores the host_index
687
+ in the spec for a single request.
688
+ :type _host_index: int, optional
689
+ :return: Returns the result object.
690
+ """ # noqa: E501
691
+
692
+ _param = self._text_to_voice_task_id_get_serialize(
693
+ task_id=task_id,
694
+ _request_auth=_request_auth,
695
+ _content_type=_content_type,
696
+ _headers=_headers,
697
+ _host_index=_host_index
698
+ )
699
+
700
+ _response_types_map: Dict[str, Optional[str]] = {
701
+ '200': "OrchestratorPipelineResult",
702
+ '422': "HTTPValidationError",
703
+ }
704
+ response_data = self.api_client.call_api(
705
+ *_param,
706
+ _request_timeout=_request_timeout
707
+ )
708
+ response_data.read()
709
+ return self.api_client.response_deserialize(
710
+ response_data=response_data,
711
+ response_types_map=_response_types_map,
712
+ )
713
+
714
+
715
+ @validate_call
716
+ def text_to_voice_task_id_get_without_preload_content(
717
+ self,
718
+ task_id: StrictStr,
719
+ _request_timeout: Union[
720
+ None,
721
+ Annotated[StrictFloat, Field(gt=0)],
722
+ Tuple[
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Annotated[StrictFloat, Field(gt=0)]
725
+ ]
726
+ ] = None,
727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
728
+ _content_type: Optional[StrictStr] = None,
729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
731
+ ) -> RESTResponseType:
732
+ """Get Text-to-Voice Task Status
733
+
734
+ Get the status of a text-to-voice task by its ID.
735
+
736
+ :param task_id: (required)
737
+ :type task_id: str
738
+ :param _request_timeout: timeout setting for this request. If one
739
+ number provided, it will be total request
740
+ timeout. It can also be a pair (tuple) of
741
+ (connection, read) timeouts.
742
+ :type _request_timeout: int, tuple(int, int), optional
743
+ :param _request_auth: set to override the auth_settings for an a single
744
+ request; this effectively ignores the
745
+ authentication in the spec for a single request.
746
+ :type _request_auth: dict, optional
747
+ :param _content_type: force content-type for the request.
748
+ :type _content_type: str, Optional
749
+ :param _headers: set to override the headers for a single
750
+ request; this effectively ignores the headers
751
+ in the spec for a single request.
752
+ :type _headers: dict, optional
753
+ :param _host_index: set to override the host_index for a single
754
+ request; this effectively ignores the host_index
755
+ in the spec for a single request.
756
+ :type _host_index: int, optional
757
+ :return: Returns the result object.
758
+ """ # noqa: E501
759
+
760
+ _param = self._text_to_voice_task_id_get_serialize(
761
+ task_id=task_id,
762
+ _request_auth=_request_auth,
763
+ _content_type=_content_type,
764
+ _headers=_headers,
765
+ _host_index=_host_index
766
+ )
767
+
768
+ _response_types_map: Dict[str, Optional[str]] = {
769
+ '200': "OrchestratorPipelineResult",
770
+ '422': "HTTPValidationError",
771
+ }
772
+ response_data = self.api_client.call_api(
773
+ *_param,
774
+ _request_timeout=_request_timeout
775
+ )
776
+ return response_data.response
777
+
778
+
779
+ def _text_to_voice_task_id_get_serialize(
780
+ self,
781
+ task_id,
782
+ _request_auth,
783
+ _content_type,
784
+ _headers,
785
+ _host_index,
786
+ ) -> RequestSerialized:
787
+
788
+ _host = None
789
+
790
+ _collection_formats: Dict[str, str] = {
791
+ }
792
+
793
+ _path_params: Dict[str, str] = {}
794
+ _query_params: List[Tuple[str, str]] = []
795
+ _header_params: Dict[str, Optional[str]] = _headers or {}
796
+ _form_params: List[Tuple[str, str]] = []
797
+ _files: Dict[
798
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
799
+ ] = {}
800
+ _body_params: Optional[bytes] = None
801
+
802
+ # process the path parameters
803
+ if task_id is not None:
804
+ _path_params['task_id'] = task_id
805
+ # process the query parameters
806
+ # process the header parameters
807
+ # process the form parameters
808
+ # process the body parameter
809
+
810
+
811
+ # set the HTTP header `Accept`
812
+ if 'Accept' not in _header_params:
813
+ _header_params['Accept'] = self.api_client.select_header_accept(
814
+ [
815
+ 'application/json'
816
+ ]
817
+ )
818
+
819
+
820
+ # authentication setting
821
+ _auth_settings: List[str] = [
822
+ 'APIKeyHeader'
823
+ ]
824
+
825
+ return self.api_client.param_serialize(
826
+ method='GET',
827
+ resource_path='/text-to-voice/{task_id}',
828
+ path_params=_path_params,
829
+ query_params=_query_params,
830
+ header_params=_header_params,
831
+ body=_body_params,
832
+ post_params=_form_params,
833
+ files=_files,
834
+ auth_settings=_auth_settings,
835
+ collection_formats=_collection_formats,
836
+ _host=_host,
837
+ _request_auth=_request_auth
838
+ )
839
+
840
+