magic_hour 0.39.0__py3-none-any.whl → 0.41.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 magic_hour might be problematic. Click here for more details.
- magic_hour/README.md +2 -0
- magic_hour/environment.py +1 -1
- magic_hour/resources/v1/README.md +2 -0
- magic_hour/resources/v1/ai_clothes_changer/README.md +2 -0
- magic_hour/resources/v1/ai_face_editor/README.md +2 -0
- magic_hour/resources/v1/ai_gif_generator/README.md +2 -0
- magic_hour/resources/v1/ai_headshot_generator/README.md +2 -0
- magic_hour/resources/v1/ai_image_editor/README.md +2 -0
- magic_hour/resources/v1/ai_image_generator/README.md +2 -0
- magic_hour/resources/v1/ai_image_upscaler/README.md +2 -0
- magic_hour/resources/v1/ai_meme_generator/README.md +2 -0
- magic_hour/resources/v1/ai_photo_editor/README.md +2 -0
- magic_hour/resources/v1/ai_qr_code_generator/README.md +2 -0
- magic_hour/resources/v1/ai_talking_photo/README.md +4 -2
- magic_hour/resources/v1/ai_voice_generator/README.md +56 -0
- magic_hour/resources/v1/ai_voice_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_voice_generator/client.py +119 -0
- magic_hour/resources/v1/animation/README.md +2 -0
- magic_hour/resources/v1/audio_projects/README.md +90 -0
- magic_hour/resources/v1/audio_projects/__init__.py +4 -0
- magic_hour/resources/v1/audio_projects/client.py +173 -0
- magic_hour/resources/v1/auto_subtitle_generator/README.md +2 -0
- magic_hour/resources/v1/client.py +14 -0
- magic_hour/resources/v1/face_detection/README.md +2 -0
- magic_hour/resources/v1/face_swap/README.md +2 -0
- magic_hour/resources/v1/face_swap_photo/README.md +2 -0
- magic_hour/resources/v1/files/README.md +2 -0
- magic_hour/resources/v1/image_background_remover/README.md +2 -0
- magic_hour/resources/v1/image_projects/README.md +2 -0
- magic_hour/resources/v1/image_to_video/README.md +2 -0
- magic_hour/resources/v1/lip_sync/README.md +4 -0
- magic_hour/resources/v1/lip_sync/client.py +10 -0
- magic_hour/resources/v1/photo_colorizer/README.md +2 -0
- magic_hour/resources/v1/text_to_video/README.md +2 -0
- magic_hour/resources/v1/video_projects/README.md +2 -0
- magic_hour/resources/v1/video_to_video/README.md +7 -7
- magic_hour/resources/v1/video_to_video/client.py +0 -2
- magic_hour/types/models/__init__.py +10 -0
- magic_hour/types/models/v1_ai_voice_generator_create_response.py +27 -0
- magic_hour/types/models/v1_audio_projects_get_response.py +72 -0
- magic_hour/types/models/v1_audio_projects_get_response_downloads_item.py +19 -0
- magic_hour/types/models/v1_audio_projects_get_response_error.py +25 -0
- magic_hour/types/params/__init__.py +18 -0
- magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +6 -4
- magic_hour/types/params/v1_ai_voice_generator_create_body.py +40 -0
- magic_hour/types/params/v1_ai_voice_generator_create_body_style.py +60 -0
- magic_hour/types/params/v1_lip_sync_create_body.py +12 -0
- magic_hour/types/params/v1_lip_sync_create_body_style.py +37 -0
- magic_hour/types/params/v1_video_to_video_create_body_style.py +19 -19
- {magic_hour-0.39.0.dist-info → magic_hour-0.41.0.dist-info}/METADATA +11 -1
- {magic_hour-0.39.0.dist-info → magic_hour-0.41.0.dist-info}/RECORD +53 -40
- {magic_hour-0.39.0.dist-info → magic_hour-0.41.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.39.0.dist-info → magic_hour-0.41.0.dist-info}/WHEEL +0 -0
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
## Module Functions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
<!-- CUSTOM DOCS START -->
|
|
7
9
|
|
|
8
10
|
### Lip Sync Generate Workflow <a name="generate"></a>
|
|
@@ -95,6 +97,8 @@ Get more information about this mode at our [product page](https://magichour.ai/
|
|
|
95
97
|
| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
|
|
96
98
|
| `max_fps_limit` | ✗ | ✗ | Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required. | `12.0` |
|
|
97
99
|
| `name` | ✗ | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Lip Sync video"` |
|
|
100
|
+
| `style` | ✗ | ✗ | Attributes used to dictate the style of the output | `{"generation_mode": "lite"}` |
|
|
101
|
+
| `└─ generation_mode` | ✗ | — | A specific version of our lip sync system, optimized for different needs. * `lite` - Fast and affordable lip sync - best for simple videos. Costs 1 credit per frame of video. * `standard` - Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video. * `pro` - Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video. Note: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers. | `"lite"` |
|
|
98
102
|
| `width` | ✗ | ✓ | `width` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
|
|
99
103
|
|
|
100
104
|
#### Synchronous Client
|
|
@@ -138,6 +138,9 @@ class LipSyncClient:
|
|
|
138
138
|
name: typing.Union[
|
|
139
139
|
typing.Optional[str], type_utils.NotGiven
|
|
140
140
|
] = type_utils.NOT_GIVEN,
|
|
141
|
+
style: typing.Union[
|
|
142
|
+
typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
|
|
143
|
+
] = type_utils.NOT_GIVEN,
|
|
141
144
|
width: typing.Union[
|
|
142
145
|
typing.Optional[int], type_utils.NotGiven
|
|
143
146
|
] = type_utils.NOT_GIVEN,
|
|
@@ -163,6 +166,7 @@ class LipSyncClient:
|
|
|
163
166
|
This field is retained only for backward compatibility and will be removed in a future release.
|
|
164
167
|
max_fps_limit: Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
|
|
165
168
|
name: The name of video. This value is mainly used for your own identification of the video.
|
|
169
|
+
style: Attributes used to dictate the style of the output
|
|
166
170
|
width: `width` is deprecated and no longer influences the output video's resolution.
|
|
167
171
|
|
|
168
172
|
Output resolution is determined by the **minimum** of:
|
|
@@ -202,6 +206,7 @@ class LipSyncClient:
|
|
|
202
206
|
"height": height,
|
|
203
207
|
"max_fps_limit": max_fps_limit,
|
|
204
208
|
"name": name,
|
|
209
|
+
"style": style,
|
|
205
210
|
"width": width,
|
|
206
211
|
"assets": assets,
|
|
207
212
|
"end_seconds": end_seconds,
|
|
@@ -339,6 +344,9 @@ class AsyncLipSyncClient:
|
|
|
339
344
|
name: typing.Union[
|
|
340
345
|
typing.Optional[str], type_utils.NotGiven
|
|
341
346
|
] = type_utils.NOT_GIVEN,
|
|
347
|
+
style: typing.Union[
|
|
348
|
+
typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
|
|
349
|
+
] = type_utils.NOT_GIVEN,
|
|
342
350
|
width: typing.Union[
|
|
343
351
|
typing.Optional[int], type_utils.NotGiven
|
|
344
352
|
] = type_utils.NOT_GIVEN,
|
|
@@ -364,6 +372,7 @@ class AsyncLipSyncClient:
|
|
|
364
372
|
This field is retained only for backward compatibility and will be removed in a future release.
|
|
365
373
|
max_fps_limit: Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
|
|
366
374
|
name: The name of video. This value is mainly used for your own identification of the video.
|
|
375
|
+
style: Attributes used to dictate the style of the output
|
|
367
376
|
width: `width` is deprecated and no longer influences the output video's resolution.
|
|
368
377
|
|
|
369
378
|
Output resolution is determined by the **minimum** of:
|
|
@@ -403,6 +412,7 @@ class AsyncLipSyncClient:
|
|
|
403
412
|
"height": height,
|
|
404
413
|
"max_fps_limit": max_fps_limit,
|
|
405
414
|
"name": name,
|
|
415
|
+
"style": style,
|
|
406
416
|
"width": width,
|
|
407
417
|
"assets": assets,
|
|
408
418
|
"end_seconds": end_seconds,
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
## Module Functions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
<!-- CUSTOM DOCS START -->
|
|
7
9
|
|
|
8
10
|
### Video To Video Generate Workflow <a name="generate"></a>
|
|
@@ -97,12 +99,12 @@ Get more information about this mode at our [product page](https://magichour.ai/
|
|
|
97
99
|
| `└─ youtube_url` | ✗ | — | Using a youtube video as the input source. This field is required if `video_source` is `youtube` | `"http://www.example.com"` |
|
|
98
100
|
| `end_seconds` | ✓ | ✗ | The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds. | `15.0` |
|
|
99
101
|
| `start_seconds` | ✓ | ✗ | The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0. | `0.0` |
|
|
100
|
-
| `style` | ✓ | ✗ | | `{"art_style": "3D Render", "model": "default", "
|
|
102
|
+
| `style` | ✓ | ✗ | | `{"art_style": "3D Render", "model": "default", "prompt_type": "default", "version": "default"}` |
|
|
101
103
|
| `└─ art_style` | ✓ | — | | `"3D Render"` |
|
|
102
|
-
| `└─ model` |
|
|
103
|
-
| `└─ prompt` |
|
|
104
|
-
| `└─ prompt_type` |
|
|
105
|
-
| `└─ version` |
|
|
104
|
+
| `└─ model` | ✗ | — | * `Dreamshaper` - a good all-around model that works for both animations as well as realism. * `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well. * `Flat 2D Anime` - best for a flat illustration style that's common in most anime. * `default` - use the default recommended model for the selected art style. | `"default"` |
|
|
105
|
+
| `└─ prompt` | ✗ | — | The prompt used for the video. Prompt is required if `prompt_type` is `custom` or `append_default`. If `prompt_type` is `default`, then the `prompt` value passed will be ignored. | `"string"` |
|
|
106
|
+
| `└─ prompt_type` | ✗ | — | * `default` - Use the default recommended prompt for the art style. * `custom` - Only use the prompt passed in the API. Note: for v1, lora prompt will still be auto added to apply the art style properly. * `append_default` - Add the default recommended prompt to the end of the prompt passed in the API. | `"default"` |
|
|
107
|
+
| `└─ version` | ✗ | — | * `v1` - more detail, closer prompt adherence, and frame-by-frame previews. * `v2` - faster, more consistent, and less noisy. * `default` - use the default version for the selected art style. | `"default"` |
|
|
106
108
|
| `fps_resolution` | ✗ | ✗ | Determines whether the resulting video will have the same frame per second as the original video, or half. * `FULL` - the result video will have the same FPS as the input video * `HALF` - the result video will have half the FPS as the input video | `"HALF"` |
|
|
107
109
|
| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
|
|
108
110
|
| `name` | ✗ | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Video To Video video"` |
|
|
@@ -122,7 +124,6 @@ res = client.v1.video_to_video.create(
|
|
|
122
124
|
style={
|
|
123
125
|
"art_style": "3D Render",
|
|
124
126
|
"model": "default",
|
|
125
|
-
"prompt": "string",
|
|
126
127
|
"prompt_type": "default",
|
|
127
128
|
"version": "default",
|
|
128
129
|
},
|
|
@@ -146,7 +147,6 @@ res = await client.v1.video_to_video.create(
|
|
|
146
147
|
style={
|
|
147
148
|
"art_style": "3D Render",
|
|
148
149
|
"model": "default",
|
|
149
|
-
"prompt": "string",
|
|
150
150
|
"prompt_type": "default",
|
|
151
151
|
"version": "default",
|
|
152
152
|
},
|
|
@@ -206,7 +206,6 @@ class VideoToVideoClient:
|
|
|
206
206
|
style={
|
|
207
207
|
"art_style": "3D Render",
|
|
208
208
|
"model": "default",
|
|
209
|
-
"prompt": "string",
|
|
210
209
|
"prompt_type": "default",
|
|
211
210
|
"version": "default",
|
|
212
211
|
},
|
|
@@ -425,7 +424,6 @@ class AsyncVideoToVideoClient:
|
|
|
425
424
|
style={
|
|
426
425
|
"art_style": "3D Render",
|
|
427
426
|
"model": "default",
|
|
428
|
-
"prompt": "string",
|
|
429
427
|
"prompt_type": "default",
|
|
430
428
|
"version": "default",
|
|
431
429
|
},
|
|
@@ -11,7 +11,13 @@ from .v1_ai_meme_generator_create_response import V1AiMemeGeneratorCreateRespons
|
|
|
11
11
|
from .v1_ai_photo_editor_create_response import V1AiPhotoEditorCreateResponse
|
|
12
12
|
from .v1_ai_qr_code_generator_create_response import V1AiQrCodeGeneratorCreateResponse
|
|
13
13
|
from .v1_ai_talking_photo_create_response import V1AiTalkingPhotoCreateResponse
|
|
14
|
+
from .v1_ai_voice_generator_create_response import V1AiVoiceGeneratorCreateResponse
|
|
14
15
|
from .v1_animation_create_response import V1AnimationCreateResponse
|
|
16
|
+
from .v1_audio_projects_get_response import V1AudioProjectsGetResponse
|
|
17
|
+
from .v1_audio_projects_get_response_downloads_item import (
|
|
18
|
+
V1AudioProjectsGetResponseDownloadsItem,
|
|
19
|
+
)
|
|
20
|
+
from .v1_audio_projects_get_response_error import V1AudioProjectsGetResponseError
|
|
15
21
|
from .v1_auto_subtitle_generator_create_response import (
|
|
16
22
|
V1AutoSubtitleGeneratorCreateResponse,
|
|
17
23
|
)
|
|
@@ -59,7 +65,11 @@ __all__ = [
|
|
|
59
65
|
"V1AiPhotoEditorCreateResponse",
|
|
60
66
|
"V1AiQrCodeGeneratorCreateResponse",
|
|
61
67
|
"V1AiTalkingPhotoCreateResponse",
|
|
68
|
+
"V1AiVoiceGeneratorCreateResponse",
|
|
62
69
|
"V1AnimationCreateResponse",
|
|
70
|
+
"V1AudioProjectsGetResponse",
|
|
71
|
+
"V1AudioProjectsGetResponseDownloadsItem",
|
|
72
|
+
"V1AudioProjectsGetResponseError",
|
|
63
73
|
"V1AutoSubtitleGeneratorCreateResponse",
|
|
64
74
|
"V1FaceDetectionCreateResponse",
|
|
65
75
|
"V1FaceDetectionGetResponse",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AiVoiceGeneratorCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
id: str = pydantic.Field(
|
|
23
|
+
alias="id",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
27
|
+
"""
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_audio_projects_get_response_downloads_item import (
|
|
6
|
+
V1AudioProjectsGetResponseDownloadsItem,
|
|
7
|
+
)
|
|
8
|
+
from .v1_audio_projects_get_response_error import V1AudioProjectsGetResponseError
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AudioProjectsGetResponse(pydantic.BaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Success
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
model_config = pydantic.ConfigDict(
|
|
17
|
+
arbitrary_types_allowed=True,
|
|
18
|
+
populate_by_name=True,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
created_at: str = pydantic.Field(
|
|
22
|
+
alias="created_at",
|
|
23
|
+
)
|
|
24
|
+
credits_charged: int = pydantic.Field(
|
|
25
|
+
alias="credits_charged",
|
|
26
|
+
)
|
|
27
|
+
"""
|
|
28
|
+
The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
29
|
+
|
|
30
|
+
If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
31
|
+
"""
|
|
32
|
+
downloads: typing.List[V1AudioProjectsGetResponseDownloadsItem] = pydantic.Field(
|
|
33
|
+
alias="downloads",
|
|
34
|
+
)
|
|
35
|
+
enabled: bool = pydantic.Field(
|
|
36
|
+
alias="enabled",
|
|
37
|
+
)
|
|
38
|
+
"""
|
|
39
|
+
Indicates whether the resource is deleted
|
|
40
|
+
"""
|
|
41
|
+
error: typing.Optional[V1AudioProjectsGetResponseError] = pydantic.Field(
|
|
42
|
+
alias="error",
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
In the case of an error, this object will contain the error encountered during video render
|
|
46
|
+
"""
|
|
47
|
+
id: str = pydantic.Field(
|
|
48
|
+
alias="id",
|
|
49
|
+
)
|
|
50
|
+
"""
|
|
51
|
+
Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
52
|
+
"""
|
|
53
|
+
name: typing.Optional[str] = pydantic.Field(
|
|
54
|
+
alias="name",
|
|
55
|
+
)
|
|
56
|
+
"""
|
|
57
|
+
The name of the audio.
|
|
58
|
+
"""
|
|
59
|
+
status: typing_extensions.Literal[
|
|
60
|
+
"canceled", "complete", "draft", "error", "queued", "rendering"
|
|
61
|
+
] = pydantic.Field(
|
|
62
|
+
alias="status",
|
|
63
|
+
)
|
|
64
|
+
"""
|
|
65
|
+
The status of the audio.
|
|
66
|
+
"""
|
|
67
|
+
type_: str = pydantic.Field(
|
|
68
|
+
alias="type",
|
|
69
|
+
)
|
|
70
|
+
"""
|
|
71
|
+
The type of the audio project. Possible values are VOICE_GENERATOR, VOICE_CHANGER
|
|
72
|
+
"""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AudioProjectsGetResponseDownloadsItem(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
The download url and expiration date of the audio project
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
expires_at: str = pydantic.Field(
|
|
15
|
+
alias="expires_at",
|
|
16
|
+
)
|
|
17
|
+
url: str = pydantic.Field(
|
|
18
|
+
alias="url",
|
|
19
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AudioProjectsGetResponseError(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
In the case of an error, this object will contain the error encountered during video render
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
code: str = pydantic.Field(
|
|
15
|
+
alias="code",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
An error code to indicate why a failure happened.
|
|
19
|
+
"""
|
|
20
|
+
message: str = pydantic.Field(
|
|
21
|
+
alias="message",
|
|
22
|
+
)
|
|
23
|
+
"""
|
|
24
|
+
Details on the reason why a failure happened.
|
|
25
|
+
"""
|
|
@@ -123,6 +123,14 @@ from .v1_ai_talking_photo_create_body_style import (
|
|
|
123
123
|
_SerializerV1AiTalkingPhotoCreateBodyStyle,
|
|
124
124
|
)
|
|
125
125
|
from .v1_ai_talking_photo_generate_body_assets import V1AiTalkingPhotoGenerateBodyAssets
|
|
126
|
+
from .v1_ai_voice_generator_create_body import (
|
|
127
|
+
V1AiVoiceGeneratorCreateBody,
|
|
128
|
+
_SerializerV1AiVoiceGeneratorCreateBody,
|
|
129
|
+
)
|
|
130
|
+
from .v1_ai_voice_generator_create_body_style import (
|
|
131
|
+
V1AiVoiceGeneratorCreateBodyStyle,
|
|
132
|
+
_SerializerV1AiVoiceGeneratorCreateBodyStyle,
|
|
133
|
+
)
|
|
126
134
|
from .v1_animation_create_body import (
|
|
127
135
|
V1AnimationCreateBody,
|
|
128
136
|
_SerializerV1AnimationCreateBody,
|
|
@@ -237,6 +245,10 @@ from .v1_lip_sync_create_body_assets import (
|
|
|
237
245
|
V1LipSyncCreateBodyAssets,
|
|
238
246
|
_SerializerV1LipSyncCreateBodyAssets,
|
|
239
247
|
)
|
|
248
|
+
from .v1_lip_sync_create_body_style import (
|
|
249
|
+
V1LipSyncCreateBodyStyle,
|
|
250
|
+
_SerializerV1LipSyncCreateBodyStyle,
|
|
251
|
+
)
|
|
240
252
|
from .v1_lip_sync_generate_body_assets import V1LipSyncGenerateBodyAssets
|
|
241
253
|
from .v1_photo_colorizer_create_body import (
|
|
242
254
|
V1PhotoColorizerCreateBody,
|
|
@@ -306,6 +318,8 @@ __all__ = [
|
|
|
306
318
|
"V1AiTalkingPhotoCreateBodyAssets",
|
|
307
319
|
"V1AiTalkingPhotoCreateBodyStyle",
|
|
308
320
|
"V1AiTalkingPhotoGenerateBodyAssets",
|
|
321
|
+
"V1AiVoiceGeneratorCreateBody",
|
|
322
|
+
"V1AiVoiceGeneratorCreateBodyStyle",
|
|
309
323
|
"V1AnimationCreateBody",
|
|
310
324
|
"V1AnimationCreateBodyAssets",
|
|
311
325
|
"V1AnimationCreateBodyStyle",
|
|
@@ -340,6 +354,7 @@ __all__ = [
|
|
|
340
354
|
"V1ImageToVideoGenerateBodyAssets",
|
|
341
355
|
"V1LipSyncCreateBody",
|
|
342
356
|
"V1LipSyncCreateBodyAssets",
|
|
357
|
+
"V1LipSyncCreateBodyStyle",
|
|
343
358
|
"V1LipSyncGenerateBodyAssets",
|
|
344
359
|
"V1PhotoColorizerCreateBody",
|
|
345
360
|
"V1PhotoColorizerCreateBodyAssets",
|
|
@@ -378,6 +393,8 @@ __all__ = [
|
|
|
378
393
|
"_SerializerV1AiTalkingPhotoCreateBody",
|
|
379
394
|
"_SerializerV1AiTalkingPhotoCreateBodyAssets",
|
|
380
395
|
"_SerializerV1AiTalkingPhotoCreateBodyStyle",
|
|
396
|
+
"_SerializerV1AiVoiceGeneratorCreateBody",
|
|
397
|
+
"_SerializerV1AiVoiceGeneratorCreateBodyStyle",
|
|
381
398
|
"_SerializerV1AnimationCreateBody",
|
|
382
399
|
"_SerializerV1AnimationCreateBodyAssets",
|
|
383
400
|
"_SerializerV1AnimationCreateBodyStyle",
|
|
@@ -403,6 +420,7 @@ __all__ = [
|
|
|
403
420
|
"_SerializerV1ImageToVideoCreateBodyStyle",
|
|
404
421
|
"_SerializerV1LipSyncCreateBody",
|
|
405
422
|
"_SerializerV1LipSyncCreateBodyAssets",
|
|
423
|
+
"_SerializerV1LipSyncCreateBodyStyle",
|
|
406
424
|
"_SerializerV1PhotoColorizerCreateBody",
|
|
407
425
|
"_SerializerV1PhotoColorizerCreateBodyAssets",
|
|
408
426
|
"_SerializerV1TextToVideoCreateBody",
|
|
@@ -9,12 +9,14 @@ class V1AiTalkingPhotoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
generation_mode: typing_extensions.NotRequired[
|
|
12
|
-
typing_extensions.Literal["expressive", "pro", "stable"]
|
|
12
|
+
typing_extensions.Literal["expressive", "pro", "stable", "standard"]
|
|
13
13
|
]
|
|
14
14
|
"""
|
|
15
15
|
Controls overall motion style.
|
|
16
|
-
* `pro` -
|
|
17
|
-
* `
|
|
16
|
+
* `pro` - Higher fidelity, realistic detail, accurate lip sync, and faster generation.
|
|
17
|
+
* `standard` - More expressive motion, but lower visual fidelity.
|
|
18
|
+
|
|
19
|
+
* `expressive` - More motion and facial expressiveness; may introduce visual artifacts. (Deprecated: passing this value will be treated as `standard`)
|
|
18
20
|
* `stable` - Reduced motion for cleaner output; may result in minimal animation. (Deprecated: passing this value will be treated as `pro`)
|
|
19
21
|
"""
|
|
20
22
|
|
|
@@ -37,6 +39,6 @@ class _SerializerV1AiTalkingPhotoCreateBodyStyle(pydantic.BaseModel):
|
|
|
37
39
|
)
|
|
38
40
|
|
|
39
41
|
generation_mode: typing.Optional[
|
|
40
|
-
typing_extensions.Literal["expressive", "pro", "stable"]
|
|
42
|
+
typing_extensions.Literal["expressive", "pro", "stable", "standard"]
|
|
41
43
|
] = pydantic.Field(alias="generation_mode", default=None)
|
|
42
44
|
intensity: typing.Optional[float] = pydantic.Field(alias="intensity", default=None)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_voice_generator_create_body_style import (
|
|
6
|
+
V1AiVoiceGeneratorCreateBodyStyle,
|
|
7
|
+
_SerializerV1AiVoiceGeneratorCreateBodyStyle,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AiVoiceGeneratorCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1AiVoiceGeneratorCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: typing_extensions.NotRequired[str]
|
|
17
|
+
"""
|
|
18
|
+
The name of audio. This value is mainly used for your own identification of the audio.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
style: typing_extensions.Required[V1AiVoiceGeneratorCreateBodyStyle]
|
|
22
|
+
"""
|
|
23
|
+
The content used to generate speech.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _SerializerV1AiVoiceGeneratorCreateBody(pydantic.BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for V1AiVoiceGeneratorCreateBody handling case conversions
|
|
30
|
+
and file omissions as dictated by the API
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
model_config = pydantic.ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
38
|
+
style: _SerializerV1AiVoiceGeneratorCreateBodyStyle = pydantic.Field(
|
|
39
|
+
alias="style",
|
|
40
|
+
)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiVoiceGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
The content used to generate speech.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
prompt: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
Text used to generate speech. Starter tier users can use up to 200 characters, while Creator, Pro, or Business users can use up to 1000.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
voice_name: typing_extensions.Required[
|
|
16
|
+
typing_extensions.Literal[
|
|
17
|
+
"Barack Obama",
|
|
18
|
+
"Donald Trump",
|
|
19
|
+
"Elon Musk",
|
|
20
|
+
"Joe Biden",
|
|
21
|
+
"Joe Rogan",
|
|
22
|
+
"Kanye West",
|
|
23
|
+
"Kim Kardashian",
|
|
24
|
+
"Mark Zuckerberg",
|
|
25
|
+
"Morgan Freeman",
|
|
26
|
+
"Taylor Swift",
|
|
27
|
+
]
|
|
28
|
+
]
|
|
29
|
+
"""
|
|
30
|
+
The voice to use for the speech. Available voices: Elon Musk, Mark Zuckerberg, Joe Rogan, Barack Obama, Morgan Freeman, Kanye West, Donald Trump, Joe Biden, Kim Kardashian, Taylor Swift
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class _SerializerV1AiVoiceGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
35
|
+
"""
|
|
36
|
+
Serializer for V1AiVoiceGeneratorCreateBodyStyle handling case conversions
|
|
37
|
+
and file omissions as dictated by the API
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
model_config = pydantic.ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
prompt: str = pydantic.Field(
|
|
45
|
+
alias="prompt",
|
|
46
|
+
)
|
|
47
|
+
voice_name: typing_extensions.Literal[
|
|
48
|
+
"Barack Obama",
|
|
49
|
+
"Donald Trump",
|
|
50
|
+
"Elon Musk",
|
|
51
|
+
"Joe Biden",
|
|
52
|
+
"Joe Rogan",
|
|
53
|
+
"Kanye West",
|
|
54
|
+
"Kim Kardashian",
|
|
55
|
+
"Mark Zuckerberg",
|
|
56
|
+
"Morgan Freeman",
|
|
57
|
+
"Taylor Swift",
|
|
58
|
+
] = pydantic.Field(
|
|
59
|
+
alias="voice_name",
|
|
60
|
+
)
|
|
@@ -6,6 +6,10 @@ from .v1_lip_sync_create_body_assets import (
|
|
|
6
6
|
V1LipSyncCreateBodyAssets,
|
|
7
7
|
_SerializerV1LipSyncCreateBodyAssets,
|
|
8
8
|
)
|
|
9
|
+
from .v1_lip_sync_create_body_style import (
|
|
10
|
+
V1LipSyncCreateBodyStyle,
|
|
11
|
+
_SerializerV1LipSyncCreateBodyStyle,
|
|
12
|
+
)
|
|
9
13
|
|
|
10
14
|
|
|
11
15
|
class V1LipSyncCreateBody(typing_extensions.TypedDict):
|
|
@@ -49,6 +53,11 @@ class V1LipSyncCreateBody(typing_extensions.TypedDict):
|
|
|
49
53
|
The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
|
|
50
54
|
"""
|
|
51
55
|
|
|
56
|
+
style: typing_extensions.NotRequired[V1LipSyncCreateBodyStyle]
|
|
57
|
+
"""
|
|
58
|
+
Attributes used to dictate the style of the output
|
|
59
|
+
"""
|
|
60
|
+
|
|
52
61
|
width: typing_extensions.NotRequired[typing.Optional[int]]
|
|
53
62
|
"""
|
|
54
63
|
`width` is deprecated and no longer influences the output video's resolution.
|
|
@@ -85,4 +94,7 @@ class _SerializerV1LipSyncCreateBody(pydantic.BaseModel):
|
|
|
85
94
|
start_seconds: float = pydantic.Field(
|
|
86
95
|
alias="start_seconds",
|
|
87
96
|
)
|
|
97
|
+
style: typing.Optional[_SerializerV1LipSyncCreateBodyStyle] = pydantic.Field(
|
|
98
|
+
alias="style", default=None
|
|
99
|
+
)
|
|
88
100
|
width: typing.Optional[int] = pydantic.Field(alias="width", default=None)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class V1LipSyncCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
Attributes used to dictate the style of the output
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
generation_mode: typing_extensions.NotRequired[
|
|
12
|
+
typing_extensions.Literal["lite", "pro", "standard"]
|
|
13
|
+
]
|
|
14
|
+
"""
|
|
15
|
+
A specific version of our lip sync system, optimized for different needs.
|
|
16
|
+
* `lite` - Fast and affordable lip sync - best for simple videos. Costs 1 credit per frame of video.
|
|
17
|
+
* `standard` - Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video.
|
|
18
|
+
* `pro` - Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video.
|
|
19
|
+
|
|
20
|
+
Note: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers.
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class _SerializerV1LipSyncCreateBodyStyle(pydantic.BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Serializer for V1LipSyncCreateBodyStyle handling case conversions
|
|
28
|
+
and file omissions as dictated by the API
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
model_config = pydantic.ConfigDict(
|
|
32
|
+
populate_by_name=True,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
generation_mode: typing.Optional[
|
|
36
|
+
typing_extensions.Literal["lite", "pro", "standard"]
|
|
37
|
+
] = pydantic.Field(alias="generation_mode", default=None)
|