Skip to content

Commit 5e6ce02

Browse files
authored
fix: lip sync generate to pass in the style object (#100)
1 parent 76c473c commit 5e6ce02

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.sdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "46c80140-0884-493b-9bb6-6209cc50d3ee",
2+
"id": "719cfc51-c189-4e81-9bf6-d25195f86e4f",
33
"tracked_paths": [
44
{
55
"editable": true,

magic_hour/resources/v1/lip_sync/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ res = client.v1.lip_sync.generate(
4040
"video_file_path": "/path/to/1234.mp4",
4141
"video_source": "file",
4242
},
43+
style={
44+
"generation_mode": "lite",
45+
},
4346
end_seconds=15.0,
4447
start_seconds=0.0,
4548
max_fps_limit=12.0,
@@ -63,6 +66,9 @@ res = await client.v1.lip_sync.generate(
6366
"video_file_path": "/path/to/1234.mp4",
6467
"video_source": "file",
6568
},
69+
style={
70+
"generation_mode": "lite",
71+
},
6672
end_seconds=15.0,
6773
start_seconds=0.0,
6874
max_fps_limit=12.0,
@@ -114,6 +120,9 @@ res = client.v1.lip_sync.create(
114120
"video_file_path": "api-assets/id/1234.mp4",
115121
"video_source": "file",
116122
},
123+
style={
124+
"generation_mode": "lite",
125+
},
117126
end_seconds=15.0,
118127
start_seconds=0.0,
119128
max_fps_limit=12.0,
@@ -135,6 +144,9 @@ res = await client.v1.lip_sync.create(
135144
"video_file_path": "api-assets/id/1234.mp4",
136145
"video_source": "file",
137146
},
147+
style={
148+
"generation_mode": "lite",
149+
},
138150
end_seconds=15.0,
139151
start_seconds=0.0,
140152
max_fps_limit=12.0,

magic_hour/resources/v1/lip_sync/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def generate(
3939
name: typing.Union[
4040
typing.Optional[str], type_utils.NotGiven
4141
] = type_utils.NOT_GIVEN,
42+
style: typing.Union[
43+
typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
44+
] = type_utils.NOT_GIVEN,
4245
width: typing.Union[
4346
typing.Optional[int], type_utils.NotGiven
4447
] = type_utils.NOT_GIVEN,
@@ -56,6 +59,7 @@ def generate(
5659
height: `height` is deprecated and no longer influences the output video's resolution.
5760
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.
5861
name: The name of video. This value is mainly used for your own identification of the video.
62+
style: Attributes used to dictate the style of the output
5963
width: `width` is deprecated and no longer influences the output video's resolution.
6064
assets: Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
6165
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.
@@ -108,6 +112,7 @@ def generate(
108112
height=height,
109113
max_fps_limit=max_fps_limit,
110114
name=name,
115+
style=style,
111116
width=width,
112117
request_options=request_options,
113118
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "magic_hour"
3-
version = "0.41.0"
3+
version = "0.41.1"
44
description = "Python SDK for Magic Hour API"
55
readme = "README.md"
66
authors = []

0 commit comments

Comments
 (0)