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.
- camb_sdk-1.0.0.dist-info/METADATA +266 -0
- camb_sdk-1.0.0.dist-info/RECORD +64 -0
- camb_sdk-1.0.0.dist-info/WHEEL +5 -0
- camb_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
- camb_sdk-1.0.0.dist-info/top_level.txt +1 -0
- cambai/__init__.py +145 -0
- cambai/api/__init__.py +12 -0
- cambai/api/apis_api.py +10291 -0
- cambai/api/audio_separation_api.py +837 -0
- cambai/api/dictionaries_api.py +286 -0
- cambai/api/dub_api.py +906 -0
- cambai/api/stories_api.py +1511 -0
- cambai/api/text_to_audio_api.py +835 -0
- cambai/api/text_to_speech_api.py +574 -0
- cambai/api/text_to_voice_api.py +840 -0
- cambai/api_client.py +801 -0
- cambai/api_response.py +21 -0
- cambai/configuration.py +603 -0
- cambai/exceptions.py +216 -0
- cambai/models/__init__.py +58 -0
- cambai/models/audio_output_file_url_response.py +87 -0
- cambai/models/audio_output_type.py +39 -0
- cambai/models/audio_separation_run_info_response.py +89 -0
- cambai/models/body_translate_translate_post.py +103 -0
- cambai/models/create_api_key_request_payload.py +89 -0
- cambai/models/create_custom_voice_out.py +87 -0
- cambai/models/create_text_to_audio_request_payload.py +89 -0
- cambai/models/create_text_to_voice_request_payload.py +89 -0
- cambai/models/create_translated_story_request_payload.py +88 -0
- cambai/models/create_translated_tts_request_payload.py +120 -0
- cambai/models/create_translation_stream_request_payload.py +108 -0
- cambai/models/create_tts_request_payload.py +102 -0
- cambai/models/create_tts_stream_request_payload.py +100 -0
- cambai/models/dialogue_item.py +93 -0
- cambai/models/dictionary.py +96 -0
- cambai/models/dub_alt_format_response_body.py +92 -0
- cambai/models/dubbed_output_in_alt_format_request_payload.py +91 -0
- cambai/models/end_to_end_dubbing_request_payload.py +99 -0
- cambai/models/expire_api_key_request_payload.py +87 -0
- cambai/models/formalities.py +37 -0
- cambai/models/gender.py +39 -0
- cambai/models/http_validation_error.py +95 -0
- cambai/models/language_item.py +91 -0
- cambai/models/languages.py +183 -0
- cambai/models/orchestrator_pipeline_result.py +95 -0
- cambai/models/output_api_key.py +105 -0
- cambai/models/output_format.py +134 -0
- cambai/models/output_type.py +37 -0
- cambai/models/request_dubbed_output_in_alt_format200_response.py +137 -0
- cambai/models/run_info_response.py +101 -0
- cambai/models/story_run_info_response.py +99 -0
- cambai/models/task_id.py +87 -0
- cambai/models/task_status.py +40 -0
- cambai/models/text_to_voice_run_info_response.py +87 -0
- cambai/models/transcript_data_type.py +37 -0
- cambai/models/transcript_file_format.py +38 -0
- cambai/models/translation_result.py +87 -0
- cambai/models/tts_stream_output_format.py +40 -0
- cambai/models/validation_error.py +99 -0
- cambai/models/validation_error_loc_inner.py +138 -0
- cambai/models/video_output_type_without_avi.py +38 -0
- cambai/models/voice_item.py +102 -0
- cambai/py.typed +0 -0
- cambai/rest.py +258 -0
|
@@ -0,0 +1,837 @@
|
|
|
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, StrictBytes, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from cambai.models.audio_separation_run_info_response import AudioSeparationRunInfoResponse
|
|
23
|
+
from cambai.models.task_id import TaskID
|
|
24
|
+
from cambai.models.task_status import TaskStatus
|
|
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 AudioSeparationApi:
|
|
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_audio_separation(
|
|
46
|
+
self,
|
|
47
|
+
audio_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.")] = None,
|
|
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 Audio Separation
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param audio_file: Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.
|
|
65
|
+
:type audio_file: bytearray
|
|
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_audio_separation_serialize(
|
|
89
|
+
audio_file=audio_file,
|
|
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_audio_separation_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
audio_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.")] = None,
|
|
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 Audio Separation
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
:param audio_file: Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.
|
|
132
|
+
:type audio_file: bytearray
|
|
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_audio_separation_serialize(
|
|
156
|
+
audio_file=audio_file,
|
|
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_audio_separation_without_preload_content(
|
|
180
|
+
self,
|
|
181
|
+
audio_file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.")] = None,
|
|
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 Audio Separation
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
:param audio_file: Media file to processed. AAC, FLAC, MP3 and WAV formats are supported.
|
|
199
|
+
:type audio_file: bytearray
|
|
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_audio_separation_serialize(
|
|
223
|
+
audio_file=audio_file,
|
|
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_audio_separation_serialize(
|
|
242
|
+
self,
|
|
243
|
+
audio_file,
|
|
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
|
+
if audio_file is not None:
|
|
269
|
+
_files['audio_file'] = audio_file
|
|
270
|
+
# process the body parameter
|
|
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
|
+
'multipart/form-data'
|
|
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='/audio-separation',
|
|
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_audio_separation_run_info_by_id(
|
|
320
|
+
self,
|
|
321
|
+
run_id: StrictInt,
|
|
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
|
+
) -> AudioSeparationRunInfoResponse:
|
|
335
|
+
"""Get Audio Separation Run Info
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
:param run_id: (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_audio_separation_run_info_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': "AudioSeparationRunInfoResponse",
|
|
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_audio_separation_run_info_by_id_with_http_info(
|
|
387
|
+
self,
|
|
388
|
+
run_id: StrictInt,
|
|
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[AudioSeparationRunInfoResponse]:
|
|
402
|
+
"""Get Audio Separation Run Info
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
:param run_id: (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_audio_separation_run_info_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': "AudioSeparationRunInfoResponse",
|
|
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_audio_separation_run_info_by_id_without_preload_content(
|
|
454
|
+
self,
|
|
455
|
+
run_id: StrictInt,
|
|
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 Audio Separation Run Info
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
:param run_id: (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_audio_separation_run_info_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': "AudioSeparationRunInfoResponse",
|
|
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_audio_separation_run_info_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='/audio-separation-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 get_audio_separation_status_by_id(
|
|
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
|
+
) -> TaskStatus:
|
|
596
|
+
"""Get Audio Separation Status
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
:param task_id: (required)
|
|
600
|
+
:type task_id: str
|
|
601
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
602
|
+
number provided, it will be total request
|
|
603
|
+
timeout. It can also be a pair (tuple) of
|
|
604
|
+
(connection, read) timeouts.
|
|
605
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
606
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
607
|
+
request; this effectively ignores the
|
|
608
|
+
authentication in the spec for a single request.
|
|
609
|
+
:type _request_auth: dict, optional
|
|
610
|
+
:param _content_type: force content-type for the request.
|
|
611
|
+
:type _content_type: str, Optional
|
|
612
|
+
:param _headers: set to override the headers for a single
|
|
613
|
+
request; this effectively ignores the headers
|
|
614
|
+
in the spec for a single request.
|
|
615
|
+
:type _headers: dict, optional
|
|
616
|
+
:param _host_index: set to override the host_index for a single
|
|
617
|
+
request; this effectively ignores the host_index
|
|
618
|
+
in the spec for a single request.
|
|
619
|
+
:type _host_index: int, optional
|
|
620
|
+
:return: Returns the result object.
|
|
621
|
+
""" # noqa: E501
|
|
622
|
+
|
|
623
|
+
_param = self._get_audio_separation_status_by_id_serialize(
|
|
624
|
+
task_id=task_id,
|
|
625
|
+
_request_auth=_request_auth,
|
|
626
|
+
_content_type=_content_type,
|
|
627
|
+
_headers=_headers,
|
|
628
|
+
_host_index=_host_index
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
632
|
+
'200': "TaskStatus",
|
|
633
|
+
'422': "HTTPValidationError",
|
|
634
|
+
}
|
|
635
|
+
response_data = self.api_client.call_api(
|
|
636
|
+
*_param,
|
|
637
|
+
_request_timeout=_request_timeout
|
|
638
|
+
)
|
|
639
|
+
response_data.read()
|
|
640
|
+
return self.api_client.response_deserialize(
|
|
641
|
+
response_data=response_data,
|
|
642
|
+
response_types_map=_response_types_map,
|
|
643
|
+
).data
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
@validate_call
|
|
647
|
+
def get_audio_separation_status_by_id_with_http_info(
|
|
648
|
+
self,
|
|
649
|
+
task_id: StrictStr,
|
|
650
|
+
_request_timeout: Union[
|
|
651
|
+
None,
|
|
652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
653
|
+
Tuple[
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
656
|
+
]
|
|
657
|
+
] = None,
|
|
658
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
659
|
+
_content_type: Optional[StrictStr] = None,
|
|
660
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
661
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
662
|
+
) -> ApiResponse[TaskStatus]:
|
|
663
|
+
"""Get Audio Separation Status
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
:param task_id: (required)
|
|
667
|
+
:type task_id: str
|
|
668
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
669
|
+
number provided, it will be total request
|
|
670
|
+
timeout. It can also be a pair (tuple) of
|
|
671
|
+
(connection, read) timeouts.
|
|
672
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
673
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
674
|
+
request; this effectively ignores the
|
|
675
|
+
authentication in the spec for a single request.
|
|
676
|
+
:type _request_auth: dict, optional
|
|
677
|
+
:param _content_type: force content-type for the request.
|
|
678
|
+
:type _content_type: str, Optional
|
|
679
|
+
:param _headers: set to override the headers for a single
|
|
680
|
+
request; this effectively ignores the headers
|
|
681
|
+
in the spec for a single request.
|
|
682
|
+
:type _headers: dict, optional
|
|
683
|
+
:param _host_index: set to override the host_index for a single
|
|
684
|
+
request; this effectively ignores the host_index
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _host_index: int, optional
|
|
687
|
+
:return: Returns the result object.
|
|
688
|
+
""" # noqa: E501
|
|
689
|
+
|
|
690
|
+
_param = self._get_audio_separation_status_by_id_serialize(
|
|
691
|
+
task_id=task_id,
|
|
692
|
+
_request_auth=_request_auth,
|
|
693
|
+
_content_type=_content_type,
|
|
694
|
+
_headers=_headers,
|
|
695
|
+
_host_index=_host_index
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
699
|
+
'200': "TaskStatus",
|
|
700
|
+
'422': "HTTPValidationError",
|
|
701
|
+
}
|
|
702
|
+
response_data = self.api_client.call_api(
|
|
703
|
+
*_param,
|
|
704
|
+
_request_timeout=_request_timeout
|
|
705
|
+
)
|
|
706
|
+
response_data.read()
|
|
707
|
+
return self.api_client.response_deserialize(
|
|
708
|
+
response_data=response_data,
|
|
709
|
+
response_types_map=_response_types_map,
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
@validate_call
|
|
714
|
+
def get_audio_separation_status_by_id_without_preload_content(
|
|
715
|
+
self,
|
|
716
|
+
task_id: StrictStr,
|
|
717
|
+
_request_timeout: Union[
|
|
718
|
+
None,
|
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
720
|
+
Tuple[
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
723
|
+
]
|
|
724
|
+
] = None,
|
|
725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
726
|
+
_content_type: Optional[StrictStr] = None,
|
|
727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
729
|
+
) -> RESTResponseType:
|
|
730
|
+
"""Get Audio Separation Status
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
:param task_id: (required)
|
|
734
|
+
:type task_id: str
|
|
735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
736
|
+
number provided, it will be total request
|
|
737
|
+
timeout. It can also be a pair (tuple) of
|
|
738
|
+
(connection, read) timeouts.
|
|
739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
741
|
+
request; this effectively ignores the
|
|
742
|
+
authentication in the spec for a single request.
|
|
743
|
+
:type _request_auth: dict, optional
|
|
744
|
+
:param _content_type: force content-type for the request.
|
|
745
|
+
:type _content_type: str, Optional
|
|
746
|
+
:param _headers: set to override the headers for a single
|
|
747
|
+
request; this effectively ignores the headers
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _headers: dict, optional
|
|
750
|
+
:param _host_index: set to override the host_index for a single
|
|
751
|
+
request; this effectively ignores the host_index
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _host_index: int, optional
|
|
754
|
+
:return: Returns the result object.
|
|
755
|
+
""" # noqa: E501
|
|
756
|
+
|
|
757
|
+
_param = self._get_audio_separation_status_by_id_serialize(
|
|
758
|
+
task_id=task_id,
|
|
759
|
+
_request_auth=_request_auth,
|
|
760
|
+
_content_type=_content_type,
|
|
761
|
+
_headers=_headers,
|
|
762
|
+
_host_index=_host_index
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
766
|
+
'200': "TaskStatus",
|
|
767
|
+
'422': "HTTPValidationError",
|
|
768
|
+
}
|
|
769
|
+
response_data = self.api_client.call_api(
|
|
770
|
+
*_param,
|
|
771
|
+
_request_timeout=_request_timeout
|
|
772
|
+
)
|
|
773
|
+
return response_data.response
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
def _get_audio_separation_status_by_id_serialize(
|
|
777
|
+
self,
|
|
778
|
+
task_id,
|
|
779
|
+
_request_auth,
|
|
780
|
+
_content_type,
|
|
781
|
+
_headers,
|
|
782
|
+
_host_index,
|
|
783
|
+
) -> RequestSerialized:
|
|
784
|
+
|
|
785
|
+
_host = None
|
|
786
|
+
|
|
787
|
+
_collection_formats: Dict[str, str] = {
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
_path_params: Dict[str, str] = {}
|
|
791
|
+
_query_params: List[Tuple[str, str]] = []
|
|
792
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
793
|
+
_form_params: List[Tuple[str, str]] = []
|
|
794
|
+
_files: Dict[
|
|
795
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
796
|
+
] = {}
|
|
797
|
+
_body_params: Optional[bytes] = None
|
|
798
|
+
|
|
799
|
+
# process the path parameters
|
|
800
|
+
if task_id is not None:
|
|
801
|
+
_path_params['task_id'] = task_id
|
|
802
|
+
# process the query parameters
|
|
803
|
+
# process the header parameters
|
|
804
|
+
# process the form parameters
|
|
805
|
+
# process the body parameter
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
# set the HTTP header `Accept`
|
|
809
|
+
if 'Accept' not in _header_params:
|
|
810
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
811
|
+
[
|
|
812
|
+
'application/json'
|
|
813
|
+
]
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
# authentication setting
|
|
818
|
+
_auth_settings: List[str] = [
|
|
819
|
+
'APIKeyHeader'
|
|
820
|
+
]
|
|
821
|
+
|
|
822
|
+
return self.api_client.param_serialize(
|
|
823
|
+
method='GET',
|
|
824
|
+
resource_path='/audio-separation/{task_id}',
|
|
825
|
+
path_params=_path_params,
|
|
826
|
+
query_params=_query_params,
|
|
827
|
+
header_params=_header_params,
|
|
828
|
+
body=_body_params,
|
|
829
|
+
post_params=_form_params,
|
|
830
|
+
files=_files,
|
|
831
|
+
auth_settings=_auth_settings,
|
|
832
|
+
collection_formats=_collection_formats,
|
|
833
|
+
_host=_host,
|
|
834
|
+
_request_auth=_request_auth
|
|
835
|
+
)
|
|
836
|
+
|
|
837
|
+
|