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,286 @@
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 typing import List
20
+ from cambai.models.dictionary import Dictionary
21
+
22
+ from cambai.api_client import ApiClient, RequestSerialized
23
+ from cambai.api_response import ApiResponse
24
+ from cambai.rest import RESTResponseType
25
+
26
+
27
+ class DictionariesApi:
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None) -> None:
35
+ if api_client is None:
36
+ api_client = ApiClient.get_default()
37
+ self.api_client = api_client
38
+
39
+
40
+ @validate_call
41
+ def dictionaries_get(
42
+ self,
43
+ _request_timeout: Union[
44
+ None,
45
+ Annotated[StrictFloat, Field(gt=0)],
46
+ Tuple[
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Annotated[StrictFloat, Field(gt=0)]
49
+ ]
50
+ ] = None,
51
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
52
+ _content_type: Optional[StrictStr] = None,
53
+ _headers: Optional[Dict[StrictStr, Any]] = None,
54
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
+ ) -> List[Dictionary]:
56
+ """Get Workspace Dictionaries
57
+
58
+ Get a list of dictionaries in the workspace.
59
+
60
+ :param _request_timeout: timeout setting for this request. If one
61
+ number provided, it will be total request
62
+ timeout. It can also be a pair (tuple) of
63
+ (connection, read) timeouts.
64
+ :type _request_timeout: int, tuple(int, int), optional
65
+ :param _request_auth: set to override the auth_settings for an a single
66
+ request; this effectively ignores the
67
+ authentication in the spec for a single request.
68
+ :type _request_auth: dict, optional
69
+ :param _content_type: force content-type for the request.
70
+ :type _content_type: str, Optional
71
+ :param _headers: set to override the headers for a single
72
+ request; this effectively ignores the headers
73
+ in the spec for a single request.
74
+ :type _headers: dict, optional
75
+ :param _host_index: set to override the host_index for a single
76
+ request; this effectively ignores the host_index
77
+ in the spec for a single request.
78
+ :type _host_index: int, optional
79
+ :return: Returns the result object.
80
+ """ # noqa: E501
81
+
82
+ _param = self._dictionaries_get_serialize(
83
+ _request_auth=_request_auth,
84
+ _content_type=_content_type,
85
+ _headers=_headers,
86
+ _host_index=_host_index
87
+ )
88
+
89
+ _response_types_map: Dict[str, Optional[str]] = {
90
+ '200': "List[Dictionary]",
91
+ '422': "HTTPValidationError",
92
+ }
93
+ response_data = self.api_client.call_api(
94
+ *_param,
95
+ _request_timeout=_request_timeout
96
+ )
97
+ response_data.read()
98
+ return self.api_client.response_deserialize(
99
+ response_data=response_data,
100
+ response_types_map=_response_types_map,
101
+ ).data
102
+
103
+
104
+ @validate_call
105
+ def dictionaries_get_with_http_info(
106
+ self,
107
+ _request_timeout: Union[
108
+ None,
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Tuple[
111
+ Annotated[StrictFloat, Field(gt=0)],
112
+ Annotated[StrictFloat, Field(gt=0)]
113
+ ]
114
+ ] = None,
115
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
116
+ _content_type: Optional[StrictStr] = None,
117
+ _headers: Optional[Dict[StrictStr, Any]] = None,
118
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
119
+ ) -> ApiResponse[List[Dictionary]]:
120
+ """Get Workspace Dictionaries
121
+
122
+ Get a list of dictionaries in the workspace.
123
+
124
+ :param _request_timeout: timeout setting for this request. If one
125
+ number provided, it will be total request
126
+ timeout. It can also be a pair (tuple) of
127
+ (connection, read) timeouts.
128
+ :type _request_timeout: int, tuple(int, int), optional
129
+ :param _request_auth: set to override the auth_settings for an a single
130
+ request; this effectively ignores the
131
+ authentication in the spec for a single request.
132
+ :type _request_auth: dict, optional
133
+ :param _content_type: force content-type for the request.
134
+ :type _content_type: str, Optional
135
+ :param _headers: set to override the headers for a single
136
+ request; this effectively ignores the headers
137
+ in the spec for a single request.
138
+ :type _headers: dict, optional
139
+ :param _host_index: set to override the host_index for a single
140
+ request; this effectively ignores the host_index
141
+ in the spec for a single request.
142
+ :type _host_index: int, optional
143
+ :return: Returns the result object.
144
+ """ # noqa: E501
145
+
146
+ _param = self._dictionaries_get_serialize(
147
+ _request_auth=_request_auth,
148
+ _content_type=_content_type,
149
+ _headers=_headers,
150
+ _host_index=_host_index
151
+ )
152
+
153
+ _response_types_map: Dict[str, Optional[str]] = {
154
+ '200': "List[Dictionary]",
155
+ '422': "HTTPValidationError",
156
+ }
157
+ response_data = self.api_client.call_api(
158
+ *_param,
159
+ _request_timeout=_request_timeout
160
+ )
161
+ response_data.read()
162
+ return self.api_client.response_deserialize(
163
+ response_data=response_data,
164
+ response_types_map=_response_types_map,
165
+ )
166
+
167
+
168
+ @validate_call
169
+ def dictionaries_get_without_preload_content(
170
+ self,
171
+ _request_timeout: Union[
172
+ None,
173
+ Annotated[StrictFloat, Field(gt=0)],
174
+ Tuple[
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Annotated[StrictFloat, Field(gt=0)]
177
+ ]
178
+ ] = None,
179
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
180
+ _content_type: Optional[StrictStr] = None,
181
+ _headers: Optional[Dict[StrictStr, Any]] = None,
182
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
183
+ ) -> RESTResponseType:
184
+ """Get Workspace Dictionaries
185
+
186
+ Get a list of dictionaries in the workspace.
187
+
188
+ :param _request_timeout: timeout setting for this request. If one
189
+ number provided, it will be total request
190
+ timeout. It can also be a pair (tuple) of
191
+ (connection, read) timeouts.
192
+ :type _request_timeout: int, tuple(int, int), optional
193
+ :param _request_auth: set to override the auth_settings for an a single
194
+ request; this effectively ignores the
195
+ authentication in the spec for a single request.
196
+ :type _request_auth: dict, optional
197
+ :param _content_type: force content-type for the request.
198
+ :type _content_type: str, Optional
199
+ :param _headers: set to override the headers for a single
200
+ request; this effectively ignores the headers
201
+ in the spec for a single request.
202
+ :type _headers: dict, optional
203
+ :param _host_index: set to override the host_index for a single
204
+ request; this effectively ignores the host_index
205
+ in the spec for a single request.
206
+ :type _host_index: int, optional
207
+ :return: Returns the result object.
208
+ """ # noqa: E501
209
+
210
+ _param = self._dictionaries_get_serialize(
211
+ _request_auth=_request_auth,
212
+ _content_type=_content_type,
213
+ _headers=_headers,
214
+ _host_index=_host_index
215
+ )
216
+
217
+ _response_types_map: Dict[str, Optional[str]] = {
218
+ '200': "List[Dictionary]",
219
+ '422': "HTTPValidationError",
220
+ }
221
+ response_data = self.api_client.call_api(
222
+ *_param,
223
+ _request_timeout=_request_timeout
224
+ )
225
+ return response_data.response
226
+
227
+
228
+ def _dictionaries_get_serialize(
229
+ self,
230
+ _request_auth,
231
+ _content_type,
232
+ _headers,
233
+ _host_index,
234
+ ) -> RequestSerialized:
235
+
236
+ _host = None
237
+
238
+ _collection_formats: Dict[str, str] = {
239
+ }
240
+
241
+ _path_params: Dict[str, str] = {}
242
+ _query_params: List[Tuple[str, str]] = []
243
+ _header_params: Dict[str, Optional[str]] = _headers or {}
244
+ _form_params: List[Tuple[str, str]] = []
245
+ _files: Dict[
246
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
247
+ ] = {}
248
+ _body_params: Optional[bytes] = None
249
+
250
+ # process the path parameters
251
+ # process the query parameters
252
+ # process the header parameters
253
+ # process the form parameters
254
+ # process the body parameter
255
+
256
+
257
+ # set the HTTP header `Accept`
258
+ if 'Accept' not in _header_params:
259
+ _header_params['Accept'] = self.api_client.select_header_accept(
260
+ [
261
+ 'application/json'
262
+ ]
263
+ )
264
+
265
+
266
+ # authentication setting
267
+ _auth_settings: List[str] = [
268
+ 'APIKeyHeader'
269
+ ]
270
+
271
+ return self.api_client.param_serialize(
272
+ method='GET',
273
+ resource_path='/dictionaries',
274
+ path_params=_path_params,
275
+ query_params=_query_params,
276
+ header_params=_header_params,
277
+ body=_body_params,
278
+ post_params=_form_params,
279
+ files=_files,
280
+ auth_settings=_auth_settings,
281
+ collection_formats=_collection_formats,
282
+ _host=_host,
283
+ _request_auth=_request_auth
284
+ )
285
+
286
+