murf 1.2.3__py3-none-any.whl → 2.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 murf might be problematic. Click here for more details.
- murf/__init__.py +31 -1
- murf/auth/client.py +11 -9
- murf/base_client.py +3 -20
- murf/client.py +0 -8
- murf/core/__init__.py +4 -0
- murf/core/client_wrapper.py +18 -17
- murf/core/unchecked_base_model.py +305 -0
- murf/dubbing/jobs/client.py +37 -31
- murf/dubbing/languages/client.py +25 -21
- murf/dubbing/projects/client.py +37 -31
- murf/dubbing_client.py +0 -8
- murf/environment.py +10 -3
- murf/stream_input/__init__.py +5 -0
- murf/stream_input/types/__init__.py +6 -0
- murf/stream_input/types/receive_message.py +7 -0
- murf/stream_input/types/send_message.py +9 -0
- murf/text/client.py +15 -13
- murf/text_to_speech/client.py +39 -33
- murf/types/__init__.py +34 -0
- murf/types/api_job_response.py +2 -2
- murf/types/api_project_response.py +2 -2
- murf/types/api_voice.py +2 -2
- murf/types/audio_output.py +27 -0
- murf/types/auth_token_response.py +2 -2
- murf/types/character_count.py +2 -2
- murf/types/clear_context.py +20 -0
- murf/types/dub_api_detail_response.py +2 -2
- murf/types/dub_job_status_response.py +2 -2
- murf/types/final_output.py +27 -0
- murf/types/form_data_content_disposition.py +2 -2
- murf/types/generate_speech_response.py +2 -2
- murf/types/group_api_project_response.py +2 -2
- murf/types/locale_response.py +2 -2
- murf/types/metadata.py +2 -2
- murf/types/murf_api_translation_response.py +2 -2
- murf/types/pronunciation_detail.py +2 -2
- murf/types/send_text.py +32 -0
- murf/types/set_advanced_settings.py +20 -0
- murf/types/set_voice_configuration.py +20 -0
- murf/types/set_voice_configuration_voice_config.py +57 -0
- murf/types/set_voice_configuration_voice_config_pronunciation_dictionary_value.py +30 -0
- murf/types/set_voice_configuration_voice_config_pronunciation_dictionary_value_type.py +7 -0
- murf/types/source_locale_response.py +2 -2
- murf/types/speech_to_speech_response.py +2 -2
- murf/types/style_details.py +2 -2
- murf/types/translation.py +2 -2
- murf/types/tts_request_both_payload.py +29 -0
- murf/types/tts_request_both_payload_voice_config.py +44 -0
- murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary.py +22 -0
- murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary_guess.py +20 -0
- murf/types/word_duration_response.py +2 -2
- murf/voice_changer/client.py +15 -13
- {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/METADATA +1 -1
- murf-2.0.0.dist-info/RECORD +98 -0
- murf-1.2.3.dist-info/RECORD +0 -80
- {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/LICENSE +0 -0
- {murf-1.2.3.dist-info → murf-2.0.0.dist-info}/WHEEL +0 -0
murf/dubbing/languages/client.py
CHANGED
|
@@ -4,7 +4,7 @@ from ...core.client_wrapper import SyncClientWrapper
|
|
|
4
4
|
import typing
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
6
|
from ...types.locale_response import LocaleResponse
|
|
7
|
-
from ...core.
|
|
7
|
+
from ...core.unchecked_base_model import construct_type
|
|
8
8
|
from ...errors.bad_request_error import BadRequestError
|
|
9
9
|
from ...errors.forbidden_error import ForbiddenError
|
|
10
10
|
from ...errors.internal_server_error import InternalServerError
|
|
@@ -44,6 +44,7 @@ class LanguagesClient:
|
|
|
44
44
|
"""
|
|
45
45
|
_response = self._client_wrapper.httpx_client.request(
|
|
46
46
|
"v1/murfdub/list-destination-languages",
|
|
47
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
47
48
|
method="GET",
|
|
48
49
|
request_options=request_options,
|
|
49
50
|
)
|
|
@@ -51,7 +52,7 @@ class LanguagesClient:
|
|
|
51
52
|
if 200 <= _response.status_code < 300:
|
|
52
53
|
return typing.cast(
|
|
53
54
|
typing.List[LocaleResponse],
|
|
54
|
-
|
|
55
|
+
construct_type(
|
|
55
56
|
type_=typing.List[LocaleResponse], # type: ignore
|
|
56
57
|
object_=_response.json(),
|
|
57
58
|
),
|
|
@@ -60,7 +61,7 @@ class LanguagesClient:
|
|
|
60
61
|
raise BadRequestError(
|
|
61
62
|
typing.cast(
|
|
62
63
|
typing.Optional[typing.Any],
|
|
63
|
-
|
|
64
|
+
construct_type(
|
|
64
65
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
65
66
|
object_=_response.json(),
|
|
66
67
|
),
|
|
@@ -70,7 +71,7 @@ class LanguagesClient:
|
|
|
70
71
|
raise ForbiddenError(
|
|
71
72
|
typing.cast(
|
|
72
73
|
typing.Optional[typing.Any],
|
|
73
|
-
|
|
74
|
+
construct_type(
|
|
74
75
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
75
76
|
object_=_response.json(),
|
|
76
77
|
),
|
|
@@ -80,7 +81,7 @@ class LanguagesClient:
|
|
|
80
81
|
raise InternalServerError(
|
|
81
82
|
typing.cast(
|
|
82
83
|
typing.Optional[typing.Any],
|
|
83
|
-
|
|
84
|
+
construct_type(
|
|
84
85
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
85
86
|
object_=_response.json(),
|
|
86
87
|
),
|
|
@@ -90,7 +91,7 @@ class LanguagesClient:
|
|
|
90
91
|
raise ServiceUnavailableError(
|
|
91
92
|
typing.cast(
|
|
92
93
|
typing.Optional[typing.Any],
|
|
93
|
-
|
|
94
|
+
construct_type(
|
|
94
95
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
95
96
|
object_=_response.json(),
|
|
96
97
|
),
|
|
@@ -126,6 +127,7 @@ class LanguagesClient:
|
|
|
126
127
|
"""
|
|
127
128
|
_response = self._client_wrapper.httpx_client.request(
|
|
128
129
|
"v1/murfdub/list-source-languages",
|
|
130
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
129
131
|
method="GET",
|
|
130
132
|
request_options=request_options,
|
|
131
133
|
)
|
|
@@ -133,7 +135,7 @@ class LanguagesClient:
|
|
|
133
135
|
if 200 <= _response.status_code < 300:
|
|
134
136
|
return typing.cast(
|
|
135
137
|
typing.List[SourceLocaleResponse],
|
|
136
|
-
|
|
138
|
+
construct_type(
|
|
137
139
|
type_=typing.List[SourceLocaleResponse], # type: ignore
|
|
138
140
|
object_=_response.json(),
|
|
139
141
|
),
|
|
@@ -142,7 +144,7 @@ class LanguagesClient:
|
|
|
142
144
|
raise BadRequestError(
|
|
143
145
|
typing.cast(
|
|
144
146
|
typing.Optional[typing.Any],
|
|
145
|
-
|
|
147
|
+
construct_type(
|
|
146
148
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
147
149
|
object_=_response.json(),
|
|
148
150
|
),
|
|
@@ -152,7 +154,7 @@ class LanguagesClient:
|
|
|
152
154
|
raise ForbiddenError(
|
|
153
155
|
typing.cast(
|
|
154
156
|
typing.Optional[typing.Any],
|
|
155
|
-
|
|
157
|
+
construct_type(
|
|
156
158
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
157
159
|
object_=_response.json(),
|
|
158
160
|
),
|
|
@@ -162,7 +164,7 @@ class LanguagesClient:
|
|
|
162
164
|
raise InternalServerError(
|
|
163
165
|
typing.cast(
|
|
164
166
|
typing.Optional[typing.Any],
|
|
165
|
-
|
|
167
|
+
construct_type(
|
|
166
168
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
167
169
|
object_=_response.json(),
|
|
168
170
|
),
|
|
@@ -172,7 +174,7 @@ class LanguagesClient:
|
|
|
172
174
|
raise ServiceUnavailableError(
|
|
173
175
|
typing.cast(
|
|
174
176
|
typing.Optional[typing.Any],
|
|
175
|
-
|
|
177
|
+
construct_type(
|
|
176
178
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
177
179
|
object_=_response.json(),
|
|
178
180
|
),
|
|
@@ -221,6 +223,7 @@ class AsyncLanguagesClient:
|
|
|
221
223
|
"""
|
|
222
224
|
_response = await self._client_wrapper.httpx_client.request(
|
|
223
225
|
"v1/murfdub/list-destination-languages",
|
|
226
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
224
227
|
method="GET",
|
|
225
228
|
request_options=request_options,
|
|
226
229
|
)
|
|
@@ -228,7 +231,7 @@ class AsyncLanguagesClient:
|
|
|
228
231
|
if 200 <= _response.status_code < 300:
|
|
229
232
|
return typing.cast(
|
|
230
233
|
typing.List[LocaleResponse],
|
|
231
|
-
|
|
234
|
+
construct_type(
|
|
232
235
|
type_=typing.List[LocaleResponse], # type: ignore
|
|
233
236
|
object_=_response.json(),
|
|
234
237
|
),
|
|
@@ -237,7 +240,7 @@ class AsyncLanguagesClient:
|
|
|
237
240
|
raise BadRequestError(
|
|
238
241
|
typing.cast(
|
|
239
242
|
typing.Optional[typing.Any],
|
|
240
|
-
|
|
243
|
+
construct_type(
|
|
241
244
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
242
245
|
object_=_response.json(),
|
|
243
246
|
),
|
|
@@ -247,7 +250,7 @@ class AsyncLanguagesClient:
|
|
|
247
250
|
raise ForbiddenError(
|
|
248
251
|
typing.cast(
|
|
249
252
|
typing.Optional[typing.Any],
|
|
250
|
-
|
|
253
|
+
construct_type(
|
|
251
254
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
252
255
|
object_=_response.json(),
|
|
253
256
|
),
|
|
@@ -257,7 +260,7 @@ class AsyncLanguagesClient:
|
|
|
257
260
|
raise InternalServerError(
|
|
258
261
|
typing.cast(
|
|
259
262
|
typing.Optional[typing.Any],
|
|
260
|
-
|
|
263
|
+
construct_type(
|
|
261
264
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
262
265
|
object_=_response.json(),
|
|
263
266
|
),
|
|
@@ -267,7 +270,7 @@ class AsyncLanguagesClient:
|
|
|
267
270
|
raise ServiceUnavailableError(
|
|
268
271
|
typing.cast(
|
|
269
272
|
typing.Optional[typing.Any],
|
|
270
|
-
|
|
273
|
+
construct_type(
|
|
271
274
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
272
275
|
object_=_response.json(),
|
|
273
276
|
),
|
|
@@ -311,6 +314,7 @@ class AsyncLanguagesClient:
|
|
|
311
314
|
"""
|
|
312
315
|
_response = await self._client_wrapper.httpx_client.request(
|
|
313
316
|
"v1/murfdub/list-source-languages",
|
|
317
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
314
318
|
method="GET",
|
|
315
319
|
request_options=request_options,
|
|
316
320
|
)
|
|
@@ -318,7 +322,7 @@ class AsyncLanguagesClient:
|
|
|
318
322
|
if 200 <= _response.status_code < 300:
|
|
319
323
|
return typing.cast(
|
|
320
324
|
typing.List[SourceLocaleResponse],
|
|
321
|
-
|
|
325
|
+
construct_type(
|
|
322
326
|
type_=typing.List[SourceLocaleResponse], # type: ignore
|
|
323
327
|
object_=_response.json(),
|
|
324
328
|
),
|
|
@@ -327,7 +331,7 @@ class AsyncLanguagesClient:
|
|
|
327
331
|
raise BadRequestError(
|
|
328
332
|
typing.cast(
|
|
329
333
|
typing.Optional[typing.Any],
|
|
330
|
-
|
|
334
|
+
construct_type(
|
|
331
335
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
332
336
|
object_=_response.json(),
|
|
333
337
|
),
|
|
@@ -337,7 +341,7 @@ class AsyncLanguagesClient:
|
|
|
337
341
|
raise ForbiddenError(
|
|
338
342
|
typing.cast(
|
|
339
343
|
typing.Optional[typing.Any],
|
|
340
|
-
|
|
344
|
+
construct_type(
|
|
341
345
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
342
346
|
object_=_response.json(),
|
|
343
347
|
),
|
|
@@ -347,7 +351,7 @@ class AsyncLanguagesClient:
|
|
|
347
351
|
raise InternalServerError(
|
|
348
352
|
typing.cast(
|
|
349
353
|
typing.Optional[typing.Any],
|
|
350
|
-
|
|
354
|
+
construct_type(
|
|
351
355
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
352
356
|
object_=_response.json(),
|
|
353
357
|
),
|
|
@@ -357,7 +361,7 @@ class AsyncLanguagesClient:
|
|
|
357
361
|
raise ServiceUnavailableError(
|
|
358
362
|
typing.cast(
|
|
359
363
|
typing.Optional[typing.Any],
|
|
360
|
-
|
|
364
|
+
construct_type(
|
|
361
365
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
362
366
|
object_=_response.json(),
|
|
363
367
|
),
|
murf/dubbing/projects/client.py
CHANGED
|
@@ -5,7 +5,7 @@ from ...core.client_wrapper import SyncClientWrapper
|
|
|
5
5
|
from .types.api_create_project_request_dubbing_type import ApiCreateProjectRequestDubbingType
|
|
6
6
|
from ...core.request_options import RequestOptions
|
|
7
7
|
from ...types.api_project_response import ApiProjectResponse
|
|
8
|
-
from ...core.
|
|
8
|
+
from ...core.unchecked_base_model import construct_type
|
|
9
9
|
from ...errors.bad_request_error import BadRequestError
|
|
10
10
|
from ...errors.forbidden_error import ForbiddenError
|
|
11
11
|
from ...errors.internal_server_error import InternalServerError
|
|
@@ -73,6 +73,7 @@ class ProjectsClient:
|
|
|
73
73
|
"""
|
|
74
74
|
_response = self._client_wrapper.httpx_client.request(
|
|
75
75
|
"v1/murfdub/projects/create",
|
|
76
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
76
77
|
method="POST",
|
|
77
78
|
json={
|
|
78
79
|
"name": name,
|
|
@@ -91,7 +92,7 @@ class ProjectsClient:
|
|
|
91
92
|
if 200 <= _response.status_code < 300:
|
|
92
93
|
return typing.cast(
|
|
93
94
|
ApiProjectResponse,
|
|
94
|
-
|
|
95
|
+
construct_type(
|
|
95
96
|
type_=ApiProjectResponse, # type: ignore
|
|
96
97
|
object_=_response.json(),
|
|
97
98
|
),
|
|
@@ -100,7 +101,7 @@ class ProjectsClient:
|
|
|
100
101
|
raise BadRequestError(
|
|
101
102
|
typing.cast(
|
|
102
103
|
typing.Optional[typing.Any],
|
|
103
|
-
|
|
104
|
+
construct_type(
|
|
104
105
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
105
106
|
object_=_response.json(),
|
|
106
107
|
),
|
|
@@ -110,7 +111,7 @@ class ProjectsClient:
|
|
|
110
111
|
raise ForbiddenError(
|
|
111
112
|
typing.cast(
|
|
112
113
|
typing.Optional[typing.Any],
|
|
113
|
-
|
|
114
|
+
construct_type(
|
|
114
115
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
115
116
|
object_=_response.json(),
|
|
116
117
|
),
|
|
@@ -120,7 +121,7 @@ class ProjectsClient:
|
|
|
120
121
|
raise InternalServerError(
|
|
121
122
|
typing.cast(
|
|
122
123
|
typing.Optional[typing.Any],
|
|
123
|
-
|
|
124
|
+
construct_type(
|
|
124
125
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
125
126
|
object_=_response.json(),
|
|
126
127
|
),
|
|
@@ -130,7 +131,7 @@ class ProjectsClient:
|
|
|
130
131
|
raise ServiceUnavailableError(
|
|
131
132
|
typing.cast(
|
|
132
133
|
typing.Optional[typing.Any],
|
|
133
|
-
|
|
134
|
+
construct_type(
|
|
134
135
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
135
136
|
object_=_response.json(),
|
|
136
137
|
),
|
|
@@ -176,6 +177,7 @@ class ProjectsClient:
|
|
|
176
177
|
"""
|
|
177
178
|
_response = self._client_wrapper.httpx_client.request(
|
|
178
179
|
"v1/murfdub/projects/list",
|
|
180
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
179
181
|
method="GET",
|
|
180
182
|
params={
|
|
181
183
|
"limit": limit,
|
|
@@ -187,7 +189,7 @@ class ProjectsClient:
|
|
|
187
189
|
if 200 <= _response.status_code < 300:
|
|
188
190
|
return typing.cast(
|
|
189
191
|
GroupApiProjectResponse,
|
|
190
|
-
|
|
192
|
+
construct_type(
|
|
191
193
|
type_=GroupApiProjectResponse, # type: ignore
|
|
192
194
|
object_=_response.json(),
|
|
193
195
|
),
|
|
@@ -196,7 +198,7 @@ class ProjectsClient:
|
|
|
196
198
|
raise BadRequestError(
|
|
197
199
|
typing.cast(
|
|
198
200
|
typing.Optional[typing.Any],
|
|
199
|
-
|
|
201
|
+
construct_type(
|
|
200
202
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
201
203
|
object_=_response.json(),
|
|
202
204
|
),
|
|
@@ -206,7 +208,7 @@ class ProjectsClient:
|
|
|
206
208
|
raise ForbiddenError(
|
|
207
209
|
typing.cast(
|
|
208
210
|
typing.Optional[typing.Any],
|
|
209
|
-
|
|
211
|
+
construct_type(
|
|
210
212
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
211
213
|
object_=_response.json(),
|
|
212
214
|
),
|
|
@@ -216,7 +218,7 @@ class ProjectsClient:
|
|
|
216
218
|
raise InternalServerError(
|
|
217
219
|
typing.cast(
|
|
218
220
|
typing.Optional[typing.Any],
|
|
219
|
-
|
|
221
|
+
construct_type(
|
|
220
222
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
221
223
|
object_=_response.json(),
|
|
222
224
|
),
|
|
@@ -226,7 +228,7 @@ class ProjectsClient:
|
|
|
226
228
|
raise ServiceUnavailableError(
|
|
227
229
|
typing.cast(
|
|
228
230
|
typing.Optional[typing.Any],
|
|
229
|
-
|
|
231
|
+
construct_type(
|
|
230
232
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
231
233
|
object_=_response.json(),
|
|
232
234
|
),
|
|
@@ -274,6 +276,7 @@ class ProjectsClient:
|
|
|
274
276
|
"""
|
|
275
277
|
_response = self._client_wrapper.httpx_client.request(
|
|
276
278
|
f"v1/murfdub/projects/{jsonable_encoder(project_id)}/update",
|
|
279
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
277
280
|
method="PUT",
|
|
278
281
|
json={
|
|
279
282
|
"target_locales": target_locales,
|
|
@@ -288,7 +291,7 @@ class ProjectsClient:
|
|
|
288
291
|
if 200 <= _response.status_code < 300:
|
|
289
292
|
return typing.cast(
|
|
290
293
|
ApiProjectResponse,
|
|
291
|
-
|
|
294
|
+
construct_type(
|
|
292
295
|
type_=ApiProjectResponse, # type: ignore
|
|
293
296
|
object_=_response.json(),
|
|
294
297
|
),
|
|
@@ -297,7 +300,7 @@ class ProjectsClient:
|
|
|
297
300
|
raise BadRequestError(
|
|
298
301
|
typing.cast(
|
|
299
302
|
typing.Optional[typing.Any],
|
|
300
|
-
|
|
303
|
+
construct_type(
|
|
301
304
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
302
305
|
object_=_response.json(),
|
|
303
306
|
),
|
|
@@ -307,7 +310,7 @@ class ProjectsClient:
|
|
|
307
310
|
raise ForbiddenError(
|
|
308
311
|
typing.cast(
|
|
309
312
|
typing.Optional[typing.Any],
|
|
310
|
-
|
|
313
|
+
construct_type(
|
|
311
314
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
312
315
|
object_=_response.json(),
|
|
313
316
|
),
|
|
@@ -317,7 +320,7 @@ class ProjectsClient:
|
|
|
317
320
|
raise InternalServerError(
|
|
318
321
|
typing.cast(
|
|
319
322
|
typing.Optional[typing.Any],
|
|
320
|
-
|
|
323
|
+
construct_type(
|
|
321
324
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
322
325
|
object_=_response.json(),
|
|
323
326
|
),
|
|
@@ -327,7 +330,7 @@ class ProjectsClient:
|
|
|
327
330
|
raise ServiceUnavailableError(
|
|
328
331
|
typing.cast(
|
|
329
332
|
typing.Optional[typing.Any],
|
|
330
|
-
|
|
333
|
+
construct_type(
|
|
331
334
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
332
335
|
object_=_response.json(),
|
|
333
336
|
),
|
|
@@ -400,6 +403,7 @@ class AsyncProjectsClient:
|
|
|
400
403
|
"""
|
|
401
404
|
_response = await self._client_wrapper.httpx_client.request(
|
|
402
405
|
"v1/murfdub/projects/create",
|
|
406
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
403
407
|
method="POST",
|
|
404
408
|
json={
|
|
405
409
|
"name": name,
|
|
@@ -418,7 +422,7 @@ class AsyncProjectsClient:
|
|
|
418
422
|
if 200 <= _response.status_code < 300:
|
|
419
423
|
return typing.cast(
|
|
420
424
|
ApiProjectResponse,
|
|
421
|
-
|
|
425
|
+
construct_type(
|
|
422
426
|
type_=ApiProjectResponse, # type: ignore
|
|
423
427
|
object_=_response.json(),
|
|
424
428
|
),
|
|
@@ -427,7 +431,7 @@ class AsyncProjectsClient:
|
|
|
427
431
|
raise BadRequestError(
|
|
428
432
|
typing.cast(
|
|
429
433
|
typing.Optional[typing.Any],
|
|
430
|
-
|
|
434
|
+
construct_type(
|
|
431
435
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
432
436
|
object_=_response.json(),
|
|
433
437
|
),
|
|
@@ -437,7 +441,7 @@ class AsyncProjectsClient:
|
|
|
437
441
|
raise ForbiddenError(
|
|
438
442
|
typing.cast(
|
|
439
443
|
typing.Optional[typing.Any],
|
|
440
|
-
|
|
444
|
+
construct_type(
|
|
441
445
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
442
446
|
object_=_response.json(),
|
|
443
447
|
),
|
|
@@ -447,7 +451,7 @@ class AsyncProjectsClient:
|
|
|
447
451
|
raise InternalServerError(
|
|
448
452
|
typing.cast(
|
|
449
453
|
typing.Optional[typing.Any],
|
|
450
|
-
|
|
454
|
+
construct_type(
|
|
451
455
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
452
456
|
object_=_response.json(),
|
|
453
457
|
),
|
|
@@ -457,7 +461,7 @@ class AsyncProjectsClient:
|
|
|
457
461
|
raise ServiceUnavailableError(
|
|
458
462
|
typing.cast(
|
|
459
463
|
typing.Optional[typing.Any],
|
|
460
|
-
|
|
464
|
+
construct_type(
|
|
461
465
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
462
466
|
object_=_response.json(),
|
|
463
467
|
),
|
|
@@ -511,6 +515,7 @@ class AsyncProjectsClient:
|
|
|
511
515
|
"""
|
|
512
516
|
_response = await self._client_wrapper.httpx_client.request(
|
|
513
517
|
"v1/murfdub/projects/list",
|
|
518
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
514
519
|
method="GET",
|
|
515
520
|
params={
|
|
516
521
|
"limit": limit,
|
|
@@ -522,7 +527,7 @@ class AsyncProjectsClient:
|
|
|
522
527
|
if 200 <= _response.status_code < 300:
|
|
523
528
|
return typing.cast(
|
|
524
529
|
GroupApiProjectResponse,
|
|
525
|
-
|
|
530
|
+
construct_type(
|
|
526
531
|
type_=GroupApiProjectResponse, # type: ignore
|
|
527
532
|
object_=_response.json(),
|
|
528
533
|
),
|
|
@@ -531,7 +536,7 @@ class AsyncProjectsClient:
|
|
|
531
536
|
raise BadRequestError(
|
|
532
537
|
typing.cast(
|
|
533
538
|
typing.Optional[typing.Any],
|
|
534
|
-
|
|
539
|
+
construct_type(
|
|
535
540
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
536
541
|
object_=_response.json(),
|
|
537
542
|
),
|
|
@@ -541,7 +546,7 @@ class AsyncProjectsClient:
|
|
|
541
546
|
raise ForbiddenError(
|
|
542
547
|
typing.cast(
|
|
543
548
|
typing.Optional[typing.Any],
|
|
544
|
-
|
|
549
|
+
construct_type(
|
|
545
550
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
546
551
|
object_=_response.json(),
|
|
547
552
|
),
|
|
@@ -551,7 +556,7 @@ class AsyncProjectsClient:
|
|
|
551
556
|
raise InternalServerError(
|
|
552
557
|
typing.cast(
|
|
553
558
|
typing.Optional[typing.Any],
|
|
554
|
-
|
|
559
|
+
construct_type(
|
|
555
560
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
556
561
|
object_=_response.json(),
|
|
557
562
|
),
|
|
@@ -561,7 +566,7 @@ class AsyncProjectsClient:
|
|
|
561
566
|
raise ServiceUnavailableError(
|
|
562
567
|
typing.cast(
|
|
563
568
|
typing.Optional[typing.Any],
|
|
564
|
-
|
|
569
|
+
construct_type(
|
|
565
570
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
566
571
|
object_=_response.json(),
|
|
567
572
|
),
|
|
@@ -617,6 +622,7 @@ class AsyncProjectsClient:
|
|
|
617
622
|
"""
|
|
618
623
|
_response = await self._client_wrapper.httpx_client.request(
|
|
619
624
|
f"v1/murfdub/projects/{jsonable_encoder(project_id)}/update",
|
|
625
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
620
626
|
method="PUT",
|
|
621
627
|
json={
|
|
622
628
|
"target_locales": target_locales,
|
|
@@ -631,7 +637,7 @@ class AsyncProjectsClient:
|
|
|
631
637
|
if 200 <= _response.status_code < 300:
|
|
632
638
|
return typing.cast(
|
|
633
639
|
ApiProjectResponse,
|
|
634
|
-
|
|
640
|
+
construct_type(
|
|
635
641
|
type_=ApiProjectResponse, # type: ignore
|
|
636
642
|
object_=_response.json(),
|
|
637
643
|
),
|
|
@@ -640,7 +646,7 @@ class AsyncProjectsClient:
|
|
|
640
646
|
raise BadRequestError(
|
|
641
647
|
typing.cast(
|
|
642
648
|
typing.Optional[typing.Any],
|
|
643
|
-
|
|
649
|
+
construct_type(
|
|
644
650
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
645
651
|
object_=_response.json(),
|
|
646
652
|
),
|
|
@@ -650,7 +656,7 @@ class AsyncProjectsClient:
|
|
|
650
656
|
raise ForbiddenError(
|
|
651
657
|
typing.cast(
|
|
652
658
|
typing.Optional[typing.Any],
|
|
653
|
-
|
|
659
|
+
construct_type(
|
|
654
660
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
655
661
|
object_=_response.json(),
|
|
656
662
|
),
|
|
@@ -660,7 +666,7 @@ class AsyncProjectsClient:
|
|
|
660
666
|
raise InternalServerError(
|
|
661
667
|
typing.cast(
|
|
662
668
|
typing.Optional[typing.Any],
|
|
663
|
-
|
|
669
|
+
construct_type(
|
|
664
670
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
665
671
|
object_=_response.json(),
|
|
666
672
|
),
|
|
@@ -670,7 +676,7 @@ class AsyncProjectsClient:
|
|
|
670
676
|
raise ServiceUnavailableError(
|
|
671
677
|
typing.cast(
|
|
672
678
|
typing.Optional[typing.Any],
|
|
673
|
-
|
|
679
|
+
construct_type(
|
|
674
680
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
675
681
|
object_=_response.json(),
|
|
676
682
|
),
|
murf/dubbing_client.py
CHANGED
|
@@ -11,8 +11,6 @@ class MurfDub(BaseClient):
|
|
|
11
11
|
|
|
12
12
|
Parameters
|
|
13
13
|
----------
|
|
14
|
-
base_url : typing.Optional[str]
|
|
15
|
-
The base url to use for requests from the client.
|
|
16
14
|
|
|
17
15
|
environment : MurfEnvironment
|
|
18
16
|
The environment to use for requests from the client. from .environment import MurfEnvironment
|
|
@@ -45,7 +43,6 @@ class MurfDub(BaseClient):
|
|
|
45
43
|
def __init__(
|
|
46
44
|
self,
|
|
47
45
|
*,
|
|
48
|
-
base_url: typing.Optional[str] = None,
|
|
49
46
|
environment: MurfEnvironment = MurfEnvironment.DEFAULT,
|
|
50
47
|
api_key: typing.Optional[str] = os.getenv("MURFDUB_API_KEY"),
|
|
51
48
|
timeout: typing.Optional[float] = 60,
|
|
@@ -57,7 +54,6 @@ class MurfDub(BaseClient):
|
|
|
57
54
|
httpx_client=httpx_client if httpx_client is not None else httpx.Client(params=default_params, timeout=_defaulted_timeout, follow_redirects=follow_redirects) if follow_redirects is not None else httpx.Client(params=default_params, timeout=_defaulted_timeout)
|
|
58
55
|
|
|
59
56
|
super().__init__(
|
|
60
|
-
base_url=base_url,
|
|
61
57
|
environment=environment,
|
|
62
58
|
api_key=api_key,
|
|
63
59
|
timeout=timeout,
|
|
@@ -73,8 +69,6 @@ class AsyncMurfDub(AsyncBaseClient):
|
|
|
73
69
|
|
|
74
70
|
Parameters
|
|
75
71
|
----------
|
|
76
|
-
base_url : typing.Optional[str]
|
|
77
|
-
The base url to use for requests from the client.
|
|
78
72
|
|
|
79
73
|
environment : MurfEnvironment
|
|
80
74
|
The environment to use for requests from the client. from .environment import MurfEnvironment
|
|
@@ -107,7 +101,6 @@ class AsyncMurfDub(AsyncBaseClient):
|
|
|
107
101
|
def __init__(
|
|
108
102
|
self,
|
|
109
103
|
*,
|
|
110
|
-
base_url: typing.Optional[str] = None,
|
|
111
104
|
environment: MurfEnvironment = MurfEnvironment.DEFAULT,
|
|
112
105
|
api_key: typing.Optional[str] = os.getenv("MURFDUB_API_KEY"),
|
|
113
106
|
timeout: typing.Optional[float] = 60,
|
|
@@ -119,7 +112,6 @@ class AsyncMurfDub(AsyncBaseClient):
|
|
|
119
112
|
httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(params=default_params, timeout=_defaulted_timeout, follow_redirects=follow_redirects) if follow_redirects is not None else httpx.AsyncClient(params=default_params, timeout=_defaulted_timeout)
|
|
120
113
|
|
|
121
114
|
super().__init__(
|
|
122
|
-
base_url=base_url,
|
|
123
115
|
environment=environment,
|
|
124
116
|
api_key=api_key,
|
|
125
117
|
timeout=timeout,
|
murf/environment.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class MurfEnvironment
|
|
7
|
-
DEFAULT
|
|
6
|
+
class MurfEnvironment:
|
|
7
|
+
DEFAULT: MurfEnvironment
|
|
8
|
+
|
|
9
|
+
def __init__(self, *, base: str, production: str):
|
|
10
|
+
self.base = base
|
|
11
|
+
self.production = production
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
MurfEnvironment.DEFAULT = MurfEnvironment(base="https://api.murf.ai", production="wss://api.murf.ai/v1/speech")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from ...types.set_voice_configuration import SetVoiceConfiguration
|
|
5
|
+
from ...types.send_text import SendText
|
|
6
|
+
from ...types.set_advanced_settings import SetAdvancedSettings
|
|
7
|
+
from ...types.clear_context import ClearContext
|
|
8
|
+
|
|
9
|
+
SendMessage = typing.Union[SetVoiceConfiguration, SendText, SetAdvancedSettings, ClearContext]
|