syncsdk 0.1.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.
Files changed (52) hide show
  1. sync/__init__.py +63 -0
  2. sync/client.py +144 -0
  3. sync/common/__init__.py +46 -0
  4. sync/common/errors/__init__.py +8 -0
  5. sync/common/errors/bad_request_error.py +9 -0
  6. sync/common/errors/internal_server_error.py +9 -0
  7. sync/common/errors/not_found_error.py +9 -0
  8. sync/common/errors/unauthorized_error.py +9 -0
  9. sync/common/types/__init__.py +39 -0
  10. sync/common/types/audio.py +27 -0
  11. sync/common/types/create_generation_dto.py +44 -0
  12. sync/common/types/estimated_generation_cost.py +33 -0
  13. sync/common/types/generation.py +77 -0
  14. sync/common/types/generation_error.py +35 -0
  15. sync/common/types/generation_error_message.py +5 -0
  16. sync/common/types/generation_id.py +3 -0
  17. sync/common/types/generation_options.py +28 -0
  18. sync/common/types/generation_status.py +7 -0
  19. sync/common/types/input.py +8 -0
  20. sync/common/types/model.py +7 -0
  21. sync/common/types/segment_frames.py +5 -0
  22. sync/common/types/segment_secs.py +5 -0
  23. sync/common/types/sync_mode.py +5 -0
  24. sync/common/types/tts.py +28 -0
  25. sync/common/types/tts_provider_config.py +34 -0
  26. sync/common/types/video.py +35 -0
  27. sync/core/__init__.py +50 -0
  28. sync/core/api_error.py +15 -0
  29. sync/core/client_wrapper.py +55 -0
  30. sync/core/datetime_utils.py +28 -0
  31. sync/core/file.py +67 -0
  32. sync/core/http_client.py +497 -0
  33. sync/core/http_response.py +47 -0
  34. sync/core/jsonable_encoder.py +100 -0
  35. sync/core/pydantic_utilities.py +294 -0
  36. sync/core/query_encoder.py +58 -0
  37. sync/core/remove_none_from_dict.py +11 -0
  38. sync/core/request_options.py +35 -0
  39. sync/core/serialization.py +276 -0
  40. sync/environment.py +7 -0
  41. sync/generate/__init__.py +2 -0
  42. sync/generate/client.py +446 -0
  43. sync/generate/raw_client.py +648 -0
  44. sync/py.typed +0 -0
  45. sync/version.py +3 -0
  46. sync/webhooks/__init__.py +5 -0
  47. sync/webhooks/types/__init__.py +6 -0
  48. sync/webhooks/types/generation_notification.py +73 -0
  49. sync/webhooks/types/webhook_status.py +5 -0
  50. syncsdk-0.1.0.dist-info/METADATA +190 -0
  51. syncsdk-0.1.0.dist-info/RECORD +52 -0
  52. syncsdk-0.1.0.dist-info/WHEEL +4 -0
sync/__init__.py ADDED
@@ -0,0 +1,63 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from . import common, generate, webhooks
4
+ from .client import AsyncSync, Sync
5
+ from .common import (
6
+ Audio,
7
+ BadRequestError,
8
+ CreateGenerationDto,
9
+ EstimatedGenerationCost,
10
+ Generation,
11
+ GenerationError,
12
+ GenerationErrorMessage,
13
+ GenerationId,
14
+ GenerationOptions,
15
+ GenerationStatus,
16
+ Input,
17
+ InternalServerError,
18
+ Model,
19
+ NotFoundError,
20
+ SegmentFrames,
21
+ SegmentSecs,
22
+ SyncMode,
23
+ Tts,
24
+ TtsProviderConfig,
25
+ UnauthorizedError,
26
+ Video,
27
+ )
28
+ from .environment import SyncEnvironment
29
+ from .version import __version__
30
+ from .webhooks import GenerationNotification, WebhookStatus
31
+
32
+ __all__ = [
33
+ "AsyncSync",
34
+ "Audio",
35
+ "BadRequestError",
36
+ "CreateGenerationDto",
37
+ "EstimatedGenerationCost",
38
+ "Generation",
39
+ "GenerationError",
40
+ "GenerationErrorMessage",
41
+ "GenerationId",
42
+ "GenerationNotification",
43
+ "GenerationOptions",
44
+ "GenerationStatus",
45
+ "Input",
46
+ "InternalServerError",
47
+ "Model",
48
+ "NotFoundError",
49
+ "SegmentFrames",
50
+ "SegmentSecs",
51
+ "Sync",
52
+ "SyncEnvironment",
53
+ "SyncMode",
54
+ "Tts",
55
+ "TtsProviderConfig",
56
+ "UnauthorizedError",
57
+ "Video",
58
+ "WebhookStatus",
59
+ "__version__",
60
+ "common",
61
+ "generate",
62
+ "webhooks",
63
+ ]
sync/client.py ADDED
@@ -0,0 +1,144 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .environment import SyncEnvironment
5
+ import httpx
6
+ from .core.client_wrapper import SyncClientWrapper
7
+ from .generate.client import GenerateClient
8
+ from .core.client_wrapper import AsyncClientWrapper
9
+ from .generate.client import AsyncGenerateClient
10
+
11
+
12
+ class Sync:
13
+ """
14
+ Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
15
+
16
+ Parameters
17
+ ----------
18
+ base_url : typing.Optional[str]
19
+ The base url to use for requests from the client.
20
+
21
+ environment : SyncEnvironment
22
+ The environment to use for requests from the client. from .environment import SyncEnvironment
23
+
24
+
25
+
26
+ Defaults to SyncEnvironment.DEFAULT
27
+
28
+
29
+
30
+ api_key : str
31
+ timeout : typing.Optional[float]
32
+ The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
33
+
34
+ follow_redirects : typing.Optional[bool]
35
+ Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
36
+
37
+ httpx_client : typing.Optional[httpx.Client]
38
+ The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
39
+
40
+ Examples
41
+ --------
42
+ from sync import Sync
43
+
44
+ client = Sync(
45
+ api_key="YOUR_API_KEY",
46
+ )
47
+ """
48
+
49
+ def __init__(
50
+ self,
51
+ *,
52
+ base_url: typing.Optional[str] = None,
53
+ environment: SyncEnvironment = SyncEnvironment.DEFAULT,
54
+ api_key: str,
55
+ timeout: typing.Optional[float] = None,
56
+ follow_redirects: typing.Optional[bool] = True,
57
+ httpx_client: typing.Optional[httpx.Client] = None,
58
+ ):
59
+ _defaulted_timeout = (
60
+ timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
61
+ )
62
+ self._client_wrapper = SyncClientWrapper(
63
+ base_url=_get_base_url(base_url=base_url, environment=environment),
64
+ api_key=api_key,
65
+ httpx_client=httpx_client
66
+ if httpx_client is not None
67
+ else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
68
+ if follow_redirects is not None
69
+ else httpx.Client(timeout=_defaulted_timeout),
70
+ timeout=_defaulted_timeout,
71
+ )
72
+ self.generate = GenerateClient(client_wrapper=self._client_wrapper)
73
+
74
+
75
+ class AsyncSync:
76
+ """
77
+ Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
78
+
79
+ Parameters
80
+ ----------
81
+ base_url : typing.Optional[str]
82
+ The base url to use for requests from the client.
83
+
84
+ environment : SyncEnvironment
85
+ The environment to use for requests from the client. from .environment import SyncEnvironment
86
+
87
+
88
+
89
+ Defaults to SyncEnvironment.DEFAULT
90
+
91
+
92
+
93
+ api_key : str
94
+ timeout : typing.Optional[float]
95
+ The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
96
+
97
+ follow_redirects : typing.Optional[bool]
98
+ Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
99
+
100
+ httpx_client : typing.Optional[httpx.AsyncClient]
101
+ The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
102
+
103
+ Examples
104
+ --------
105
+ from sync import AsyncSync
106
+
107
+ client = AsyncSync(
108
+ api_key="YOUR_API_KEY",
109
+ )
110
+ """
111
+
112
+ def __init__(
113
+ self,
114
+ *,
115
+ base_url: typing.Optional[str] = None,
116
+ environment: SyncEnvironment = SyncEnvironment.DEFAULT,
117
+ api_key: str,
118
+ timeout: typing.Optional[float] = None,
119
+ follow_redirects: typing.Optional[bool] = True,
120
+ httpx_client: typing.Optional[httpx.AsyncClient] = None,
121
+ ):
122
+ _defaulted_timeout = (
123
+ timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
124
+ )
125
+ self._client_wrapper = AsyncClientWrapper(
126
+ base_url=_get_base_url(base_url=base_url, environment=environment),
127
+ api_key=api_key,
128
+ httpx_client=httpx_client
129
+ if httpx_client is not None
130
+ else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
131
+ if follow_redirects is not None
132
+ else httpx.AsyncClient(timeout=_defaulted_timeout),
133
+ timeout=_defaulted_timeout,
134
+ )
135
+ self.generate = AsyncGenerateClient(client_wrapper=self._client_wrapper)
136
+
137
+
138
+ def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SyncEnvironment) -> str:
139
+ if base_url is not None:
140
+ return base_url
141
+ elif environment is not None:
142
+ return environment.value
143
+ else:
144
+ raise Exception("Please pass in either base_url or environment to construct the client")
@@ -0,0 +1,46 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import (
4
+ Audio,
5
+ CreateGenerationDto,
6
+ EstimatedGenerationCost,
7
+ Generation,
8
+ GenerationError,
9
+ GenerationErrorMessage,
10
+ GenerationId,
11
+ GenerationOptions,
12
+ GenerationStatus,
13
+ Input,
14
+ Model,
15
+ SegmentFrames,
16
+ SegmentSecs,
17
+ SyncMode,
18
+ Tts,
19
+ TtsProviderConfig,
20
+ Video,
21
+ )
22
+ from .errors import BadRequestError, InternalServerError, NotFoundError, UnauthorizedError
23
+
24
+ __all__ = [
25
+ "Audio",
26
+ "BadRequestError",
27
+ "CreateGenerationDto",
28
+ "EstimatedGenerationCost",
29
+ "Generation",
30
+ "GenerationError",
31
+ "GenerationErrorMessage",
32
+ "GenerationId",
33
+ "GenerationOptions",
34
+ "GenerationStatus",
35
+ "Input",
36
+ "InternalServerError",
37
+ "Model",
38
+ "NotFoundError",
39
+ "SegmentFrames",
40
+ "SegmentSecs",
41
+ "SyncMode",
42
+ "Tts",
43
+ "TtsProviderConfig",
44
+ "UnauthorizedError",
45
+ "Video",
46
+ ]
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .bad_request_error import BadRequestError
4
+ from .internal_server_error import InternalServerError
5
+ from .not_found_error import NotFoundError
6
+ from .unauthorized_error import UnauthorizedError
7
+
8
+ __all__ = ["BadRequestError", "InternalServerError", "NotFoundError", "UnauthorizedError"]
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.api_error import ApiError
4
+ from ..types.generation_error import GenerationError
5
+
6
+
7
+ class BadRequestError(ApiError):
8
+ def __init__(self, body: GenerationError):
9
+ super().__init__(status_code=400, body=body)
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.api_error import ApiError
4
+ from ..types.generation_error import GenerationError
5
+
6
+
7
+ class InternalServerError(ApiError):
8
+ def __init__(self, body: GenerationError):
9
+ super().__init__(status_code=500, body=body)
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.api_error import ApiError
4
+ from ..types.generation_error import GenerationError
5
+
6
+
7
+ class NotFoundError(ApiError):
8
+ def __init__(self, body: GenerationError):
9
+ super().__init__(status_code=404, body=body)
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.api_error import ApiError
4
+ from ..types.generation_error import GenerationError
5
+
6
+
7
+ class UnauthorizedError(ApiError):
8
+ def __init__(self, body: GenerationError):
9
+ super().__init__(status_code=401, body=body)
@@ -0,0 +1,39 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .audio import Audio
4
+ from .create_generation_dto import CreateGenerationDto
5
+ from .estimated_generation_cost import EstimatedGenerationCost
6
+ from .generation import Generation
7
+ from .generation_error import GenerationError
8
+ from .generation_error_message import GenerationErrorMessage
9
+ from .generation_id import GenerationId
10
+ from .generation_options import GenerationOptions
11
+ from .generation_status import GenerationStatus
12
+ from .input import Input
13
+ from .model import Model
14
+ from .segment_frames import SegmentFrames
15
+ from .segment_secs import SegmentSecs
16
+ from .sync_mode import SyncMode
17
+ from .tts import Tts
18
+ from .tts_provider_config import TtsProviderConfig
19
+ from .video import Video
20
+
21
+ __all__ = [
22
+ "Audio",
23
+ "CreateGenerationDto",
24
+ "EstimatedGenerationCost",
25
+ "Generation",
26
+ "GenerationError",
27
+ "GenerationErrorMessage",
28
+ "GenerationId",
29
+ "GenerationOptions",
30
+ "GenerationStatus",
31
+ "Input",
32
+ "Model",
33
+ "SegmentFrames",
34
+ "SegmentSecs",
35
+ "SyncMode",
36
+ "Tts",
37
+ "TtsProviderConfig",
38
+ "Video",
39
+ ]
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ import pydantic
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class Audio(UniversalBaseModel):
10
+ """
11
+ Recorded/Captured audio input
12
+ """
13
+
14
+ type: typing.Literal["audio"] = "audio"
15
+ url: str = pydantic.Field()
16
+ """
17
+ URL of the audio to be used for generation
18
+ """
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -0,0 +1,44 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from .model import Model
5
+ import pydantic
6
+ import typing
7
+ from .input import Input
8
+ from .generation_options import GenerationOptions
9
+ import typing_extensions
10
+ from ...core.serialization import FieldMetadata
11
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
12
+
13
+
14
+ class CreateGenerationDto(UniversalBaseModel):
15
+ model: Model = pydantic.Field()
16
+ """
17
+ name of the model to use for generation.
18
+ """
19
+
20
+ input: typing.List[Input] = pydantic.Field()
21
+ """
22
+ Array of input objects. Must include one video input item and one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration.
23
+ """
24
+
25
+ options: typing.Optional[GenerationOptions] = pydantic.Field(default=None)
26
+ """
27
+ additional options available for generation.
28
+ """
29
+
30
+ webhook_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="webhookUrl")] = pydantic.Field(
31
+ default=None
32
+ )
33
+ """
34
+ webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
35
+ """
36
+
37
+ if IS_PYDANTIC_V2:
38
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
39
+ else:
40
+
41
+ class Config:
42
+ frozen = True
43
+ smart_union = True
44
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ...core.serialization import FieldMetadata
6
+ import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import typing
9
+
10
+
11
+ class EstimatedGenerationCost(UniversalBaseModel):
12
+ estimated_frame_count: typing_extensions.Annotated[float, FieldMetadata(alias="estimatedFrameCount")] = (
13
+ pydantic.Field()
14
+ )
15
+ """
16
+ The estimated frame count for the generation.
17
+ """
18
+
19
+ estimated_generation_cost: typing_extensions.Annotated[float, FieldMetadata(alias="estimatedGenerationCost")] = (
20
+ pydantic.Field()
21
+ )
22
+ """
23
+ The estimated cost of the generation in USD.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,77 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ import datetime as dt
6
+ from ...core.serialization import FieldMetadata
7
+ import pydantic
8
+ import typing
9
+ from .generation_id import GenerationId
10
+ from .input import Input
11
+ from .model import Model
12
+ from .generation_options import GenerationOptions
13
+ from .generation_status import GenerationStatus
14
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
15
+
16
+
17
+ class Generation(UniversalBaseModel):
18
+ created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
19
+ """
20
+ The date and time the generation was created.
21
+ """
22
+
23
+ error: typing.Optional[str] = pydantic.Field(default=None)
24
+ """
25
+ The error message if the generation failed.
26
+ """
27
+
28
+ id: GenerationId
29
+ input: typing.List[Input] = pydantic.Field()
30
+ """
31
+ An array of input objects used for generation.
32
+ """
33
+
34
+ model: Model = pydantic.Field()
35
+ """
36
+ The name of the model used for generation.
37
+ """
38
+
39
+ options: typing.Optional[GenerationOptions] = pydantic.Field(default=None)
40
+ """
41
+ Options for the generation.
42
+ """
43
+
44
+ output_duration: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="outputDuration")] = (
45
+ pydantic.Field(default=None)
46
+ )
47
+ """
48
+ The duration of the output media.
49
+ """
50
+
51
+ output_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="outputUrl")] = pydantic.Field(
52
+ default=None
53
+ )
54
+ """
55
+ The URL of the output media.
56
+ """
57
+
58
+ status: GenerationStatus = pydantic.Field()
59
+ """
60
+ The status of the generation.
61
+ """
62
+
63
+ webhook_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="webhookUrl")] = pydantic.Field(
64
+ default=None
65
+ )
66
+ """
67
+ The URL to the webhook endpoint.
68
+ """
69
+
70
+ if IS_PYDANTIC_V2:
71
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
72
+ else:
73
+
74
+ class Config:
75
+ frozen = True
76
+ smart_union = True
77
+ extra = pydantic.Extra.allow
@@ -0,0 +1,35 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
5
+ from .generation_error_message import GenerationErrorMessage
6
+ import typing_extensions
7
+ from ...core.serialization import FieldMetadata
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
+ import typing
10
+
11
+
12
+ class GenerationError(UniversalBaseModel):
13
+ error: str = pydantic.Field()
14
+ """
15
+ The type of error that occurred.
16
+ """
17
+
18
+ message: GenerationErrorMessage = pydantic.Field()
19
+ """
20
+ A message describing the error.
21
+ """
22
+
23
+ status_code: typing_extensions.Annotated[float, FieldMetadata(alias="statusCode")] = pydantic.Field()
24
+ """
25
+ The type of error that occurred.
26
+ """
27
+
28
+ if IS_PYDANTIC_V2:
29
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
30
+ else:
31
+
32
+ class Config:
33
+ frozen = True
34
+ smart_union = True
35
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ GenerationErrorMessage = typing.Union[str, typing.List[str]]
@@ -0,0 +1,3 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ GenerationId = str
@@ -0,0 +1,28 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .sync_mode import SyncMode
6
+ import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class GenerationOptions(UniversalBaseModel):
11
+ sync_mode: typing.Optional[SyncMode] = pydantic.Field(default=None)
12
+ """
13
+ lipsync mode when audio and video durations are out of sync. By default if the audio and video durations are out of sync and audio is longer than video, the video will loop. Otherwise, the video will be cut off at the end of the audio.
14
+ """
15
+
16
+ active_speaker: typing.Optional[bool] = pydantic.Field(default=None)
17
+ """
18
+ Whether to detect active speaker and apply generation to them
19
+ """
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic.Extra.allow
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ GenerationStatus = typing.Union[
6
+ typing.Literal["PENDING", "PROCESSING", "COMPLETED", "FAILED", "REJECTED", "CANCELED"], typing.Any
7
+ ]
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .video import Video
5
+ from .audio import Audio
6
+ from .tts import Tts
7
+
8
+ Input = typing.Union[Video, Audio, Tts]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ Model = typing.Union[
6
+ typing.Literal["lipsync-2", "lipsync-1.9.0-beta", "lipsync-1.8.0", "lipsync-1.7.1", "lipsync-1.6.0"], typing.Any
7
+ ]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SegmentFrames = typing.List[int]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SegmentSecs = typing.List[float]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SyncMode = typing.Union[typing.Literal["loop", "bounce", "cut_off", "silence", "remap"], typing.Any]