syncsdk 0.2.2__tar.gz → 0.2.4__tar.gz

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 (68) hide show
  1. {syncsdk-0.2.2 → syncsdk-0.2.4}/PKG-INFO +1 -1
  2. {syncsdk-0.2.2 → syncsdk-0.2.4}/pyproject.toml +1 -1
  3. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/__init__.py +4 -0
  4. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/__init__.py +4 -0
  5. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/__init__.py +4 -0
  6. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/audio.py +9 -0
  7. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/create_generation_dto.py +7 -1
  8. syncsdk-0.2.4/src/sync/common/types/generation_segment.py +37 -0
  9. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation_status.py +1 -1
  10. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/model.py +1 -1
  11. syncsdk-0.2.4/src/sync/common/types/segment_audio_input.py +38 -0
  12. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/tts.py +9 -0
  13. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/video.py +2 -2
  14. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/client_wrapper.py +2 -2
  15. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/generations/client.py +25 -4
  16. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/generations/raw_client.py +33 -4
  17. {syncsdk-0.2.2 → syncsdk-0.2.4}/README.md +0 -0
  18. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/batch/__init__.py +0 -0
  19. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/batch/client.py +0 -0
  20. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/batch/raw_client.py +0 -0
  21. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/client.py +0 -0
  22. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/__init__.py +0 -0
  23. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/bad_request_error.py +0 -0
  24. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/internal_server_error.py +0 -0
  25. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/not_found_error.py +0 -0
  26. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/payment_required_error.py +0 -0
  27. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/too_many_requests_error.py +0 -0
  28. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/errors/unauthorized_error.py +0 -0
  29. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/active_speaker.py +0 -0
  30. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/batch_id.py +0 -0
  31. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/batch_metrics.py +0 -0
  32. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/batch_response.py +0 -0
  33. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/batch_status.py +0 -0
  34. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/create_batch_response.py +0 -0
  35. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/eleven_labs.py +0 -0
  36. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/estimated_generation_cost.py +0 -0
  37. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation.py +0 -0
  38. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation_error.py +0 -0
  39. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation_error_message.py +0 -0
  40. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation_id.py +0 -0
  41. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/generation_options.py +0 -0
  42. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/input.py +0 -0
  43. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/segment_frames.py +0 -0
  44. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/segment_secs.py +0 -0
  45. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/sync_mode.py +0 -0
  46. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/tts_provider_config.py +0 -0
  47. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/common/types/validation_response.py +0 -0
  48. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/__init__.py +0 -0
  49. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/api_error.py +0 -0
  50. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/datetime_utils.py +0 -0
  51. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/file.py +0 -0
  52. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/http_client.py +0 -0
  53. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/http_response.py +0 -0
  54. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/jsonable_encoder.py +0 -0
  55. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/pydantic_utilities.py +0 -0
  56. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/query_encoder.py +0 -0
  57. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/remove_none_from_dict.py +0 -0
  58. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/request_options.py +0 -0
  59. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/serialization.py +0 -0
  60. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/core/unchecked_base_model.py +0 -0
  61. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/environment.py +0 -0
  62. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/generations/__init__.py +0 -0
  63. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/py.typed +0 -0
  64. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/version.py +0 -0
  65. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/webhooks/__init__.py +0 -0
  66. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/webhooks/types/__init__.py +0 -0
  67. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/webhooks/types/generation_notification.py +0 -0
  68. {syncsdk-0.2.2 → syncsdk-0.2.4}/src/sync/webhooks/types/webhook_status.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: syncsdk
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -3,7 +3,7 @@ name = "syncsdk"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "syncsdk"
6
- version = "0.2.2"
6
+ version = "0.2.4"
7
7
  description = ""
8
8
  readme = "README.md"
9
9
  authors = []
@@ -19,12 +19,14 @@ from .common import (
19
19
  GenerationErrorMessage,
20
20
  GenerationId,
21
21
  GenerationOptions,
22
+ GenerationSegment,
22
23
  GenerationStatus,
23
24
  Input,
24
25
  InternalServerError,
25
26
  Model,
26
27
  NotFoundError,
27
28
  PaymentRequiredError,
29
+ SegmentAudioInput,
28
30
  SegmentFrames,
29
31
  SegmentSecs,
30
32
  SyncMode,
@@ -58,12 +60,14 @@ __all__ = [
58
60
  "GenerationId",
59
61
  "GenerationNotification",
60
62
  "GenerationOptions",
63
+ "GenerationSegment",
61
64
  "GenerationStatus",
62
65
  "Input",
63
66
  "InternalServerError",
64
67
  "Model",
65
68
  "NotFoundError",
66
69
  "PaymentRequiredError",
70
+ "SegmentAudioInput",
67
71
  "SegmentFrames",
68
72
  "SegmentSecs",
69
73
  "Sync",
@@ -16,9 +16,11 @@ from .types import (
16
16
  GenerationErrorMessage,
17
17
  GenerationId,
18
18
  GenerationOptions,
19
+ GenerationSegment,
19
20
  GenerationStatus,
20
21
  Input,
21
22
  Model,
23
+ SegmentAudioInput,
22
24
  SegmentFrames,
23
25
  SegmentSecs,
24
26
  SyncMode,
@@ -53,12 +55,14 @@ __all__ = [
53
55
  "GenerationErrorMessage",
54
56
  "GenerationId",
55
57
  "GenerationOptions",
58
+ "GenerationSegment",
56
59
  "GenerationStatus",
57
60
  "Input",
58
61
  "InternalServerError",
59
62
  "Model",
60
63
  "NotFoundError",
61
64
  "PaymentRequiredError",
65
+ "SegmentAudioInput",
62
66
  "SegmentFrames",
63
67
  "SegmentSecs",
64
68
  "SyncMode",
@@ -15,9 +15,11 @@ from .generation_error import GenerationError
15
15
  from .generation_error_message import GenerationErrorMessage
16
16
  from .generation_id import GenerationId
17
17
  from .generation_options import GenerationOptions
18
+ from .generation_segment import GenerationSegment
18
19
  from .generation_status import GenerationStatus
19
20
  from .input import Input
20
21
  from .model import Model
22
+ from .segment_audio_input import SegmentAudioInput
21
23
  from .segment_frames import SegmentFrames
22
24
  from .segment_secs import SegmentSecs
23
25
  from .sync_mode import SyncMode
@@ -42,9 +44,11 @@ __all__ = [
42
44
  "GenerationErrorMessage",
43
45
  "GenerationId",
44
46
  "GenerationOptions",
47
+ "GenerationSegment",
45
48
  "GenerationStatus",
46
49
  "Input",
47
50
  "Model",
51
+ "SegmentAudioInput",
48
52
  "SegmentFrames",
49
53
  "SegmentSecs",
50
54
  "SyncMode",
@@ -3,6 +3,8 @@
3
3
  from ...core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  import pydantic
6
+ import typing_extensions
7
+ from ...core.serialization import FieldMetadata
6
8
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
9
 
8
10
 
@@ -17,6 +19,13 @@ class Audio(UncheckedBaseModel):
17
19
  URL of the audio to be used for generation
18
20
  """
19
21
 
22
+ ref_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="refId")] = pydantic.Field(
23
+ default=None
24
+ )
25
+ """
26
+ Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array.
27
+ """
28
+
20
29
  if IS_PYDANTIC_V2:
21
30
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
31
  else:
@@ -6,6 +6,7 @@ import pydantic
6
6
  import typing
7
7
  from .input import Input
8
8
  from .generation_options import GenerationOptions
9
+ from .generation_segment import GenerationSegment
9
10
  import typing_extensions
10
11
  from ...core.serialization import FieldMetadata
11
12
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
@@ -19,7 +20,7 @@ class CreateGenerationDto(UncheckedBaseModel):
19
20
 
20
21
  input: typing.List[Input] = pydantic.Field()
21
22
  """
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
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
23
24
  """
24
25
 
25
26
  options: typing.Optional[GenerationOptions] = pydantic.Field(default=None)
@@ -27,6 +28,11 @@ class CreateGenerationDto(UncheckedBaseModel):
27
28
  additional options available for generation.
28
29
  """
29
30
 
31
+ segments: typing.Optional[typing.List[GenerationSegment]] = pydantic.Field(default=None)
32
+ """
33
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
34
+ """
35
+
30
36
  webhook_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="webhookUrl")] = pydantic.Field(
31
37
  default=None
32
38
  )
@@ -0,0 +1,37 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ from .segment_audio_input import SegmentAudioInput
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
8
+
9
+
10
+ class GenerationSegment(UncheckedBaseModel):
11
+ """
12
+ Defines a video segment with its corresponding audio input. Used for multi-segment lipsync generations where different audio tracks can be applied to different video segments.
13
+ """
14
+
15
+ start_time: float = pydantic.Field()
16
+ """
17
+ Segment start time in seconds
18
+ """
19
+
20
+ end_time: float = pydantic.Field()
21
+ """
22
+ Segment end time in seconds
23
+ """
24
+
25
+ audio_input: SegmentAudioInput = pydantic.Field()
26
+ """
27
+ Audio configuration for this segment
28
+ """
29
+
30
+ if IS_PYDANTIC_V2:
31
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
32
+ else:
33
+
34
+ class Config:
35
+ frozen = True
36
+ smart_union = True
37
+ extra = pydantic.Extra.allow
@@ -2,4 +2,4 @@
2
2
 
3
3
  import typing
4
4
 
5
- GenerationStatus = typing.Union[typing.Literal["PENDING", "PROCESSING", "COMPLETED", "FAILED"], typing.Any]
5
+ GenerationStatus = typing.Union[typing.Literal["PENDING", "PROCESSING", "COMPLETED", "FAILED", "REJECTED"], typing.Any]
@@ -2,4 +2,4 @@
2
2
 
3
3
  import typing
4
4
 
5
- Model = typing.Union[typing.Literal["lipsync-2", "lipsync-1.9.0-beta"], typing.Any]
5
+ Model = typing.Union[typing.Literal["lipsync-2", "lipsync-1.9.0-beta", "lipsync-2-pro"], typing.Any]
@@ -0,0 +1,38 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.unchecked_base_model import UncheckedBaseModel
4
+ import typing_extensions
5
+ from ...core.serialization import FieldMetadata
6
+ import pydantic
7
+ import typing
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
+
10
+
11
+ class SegmentAudioInput(UncheckedBaseModel):
12
+ """
13
+ Audio input configuration for a specific segment. References an audio input by refId and optionally crops the audio to a specific time range.
14
+ """
15
+
16
+ ref_id: typing_extensions.Annotated[str, FieldMetadata(alias="refId")] = pydantic.Field()
17
+ """
18
+ Reference ID of the audio/text-to-speech input to use for this segment
19
+ """
20
+
21
+ start_time: typing.Optional[float] = pydantic.Field(default=None)
22
+ """
23
+ Optional start time (in seconds) to crop the referenced audio. When specified, end_time must also be provided.
24
+ """
25
+
26
+ end_time: typing.Optional[float] = pydantic.Field(default=None)
27
+ """
28
+ Optional end time (in seconds) to crop the referenced audio. When specified, start_time must also be provided.
29
+ """
30
+
31
+ if IS_PYDANTIC_V2:
32
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
33
+ else:
34
+
35
+ class Config:
36
+ frozen = True
37
+ smart_union = True
38
+ extra = pydantic.Extra.allow
@@ -4,6 +4,8 @@ from ...core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .tts_provider_config import TtsProviderConfig
6
6
  import pydantic
7
+ import typing_extensions
8
+ from ...core.serialization import FieldMetadata
7
9
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
10
 
9
11
 
@@ -18,6 +20,13 @@ class Tts(UncheckedBaseModel):
18
20
  Integration provider configuration
19
21
  """
20
22
 
23
+ ref_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="refId")] = pydantic.Field(
24
+ default=None
25
+ )
26
+ """
27
+ Reference identifier for this audio input, used to link audio inputs to specific segments when using [segments](/api-reference/api/generate-api/create#request.body.segments). Required when using segments array.
28
+ """
29
+
21
30
  if IS_PYDANTIC_V2:
22
31
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
32
  else:
@@ -17,12 +17,12 @@ class Video(UncheckedBaseModel):
17
17
 
18
18
  segments_secs: typing.Optional[SegmentSecs] = pydantic.Field(default=None)
19
19
  """
20
- Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video.
20
+ [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video.
21
21
  """
22
22
 
23
23
  segments_frames: typing.Optional[SegmentFrames] = pydantic.Field(default=None)
24
24
  """
25
- Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video
25
+ [DEPRECATED] Use the top-level segments array instead for multi-segment support. Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video
26
26
  """
27
27
 
28
28
  if IS_PYDANTIC_V2:
@@ -14,10 +14,10 @@ class BaseClientWrapper:
14
14
 
15
15
  def get_headers(self) -> typing.Dict[str, str]:
16
16
  headers: typing.Dict[str, str] = {
17
- "User-Agent": "syncsdk/0.2.2",
17
+ "User-Agent": "syncsdk/0.2.4",
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "syncsdk",
20
- "X-Fern-SDK-Version": "0.2.2",
20
+ "X-Fern-SDK-Version": "0.2.4",
21
21
  }
22
22
  headers["x-api-key"] = self.api_key
23
23
  return headers
@@ -6,6 +6,7 @@ from .raw_client import RawGenerationsClient
6
6
  from ..common.types.model import Model
7
7
  from ..common.types.input import Input
8
8
  from ..common.types.generation_options import GenerationOptions
9
+ from ..common.types.generation_segment import GenerationSegment
9
10
  from ..core.request_options import RequestOptions
10
11
  from ..common.types.generation import Generation
11
12
  from .. import core
@@ -40,6 +41,7 @@ class GenerationsClient:
40
41
  model: Model,
41
42
  input: typing.Sequence[Input],
42
43
  options: typing.Optional[GenerationOptions] = OMIT,
44
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
43
45
  webhook_url: typing.Optional[str] = OMIT,
44
46
  output_file_name: typing.Optional[str] = OMIT,
45
47
  request_options: typing.Optional[RequestOptions] = None,
@@ -51,11 +53,14 @@ class GenerationsClient:
51
53
  name of the model to use for generation.
52
54
 
53
55
  input : typing.Sequence[Input]
54
- 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.
56
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
55
57
 
56
58
  options : typing.Optional[GenerationOptions]
57
59
  additional options available for generation.
58
60
 
61
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
62
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
63
+
59
64
  webhook_url : typing.Optional[str]
60
65
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
61
66
 
@@ -97,6 +102,7 @@ class GenerationsClient:
97
102
  model=model,
98
103
  input=input,
99
104
  options=options,
105
+ segments=segments,
100
106
  webhook_url=webhook_url,
101
107
  output_file_name=output_file_name,
102
108
  request_options=request_options,
@@ -228,6 +234,7 @@ class GenerationsClient:
228
234
  model: Model,
229
235
  input: typing.Sequence[Input],
230
236
  options: typing.Optional[GenerationOptions] = OMIT,
237
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
231
238
  webhook_url: typing.Optional[str] = OMIT,
232
239
  output_file_name: typing.Optional[str] = OMIT,
233
240
  request_options: typing.Optional[RequestOptions] = None,
@@ -239,11 +246,14 @@ class GenerationsClient:
239
246
  name of the model to use for generation.
240
247
 
241
248
  input : typing.Sequence[Input]
242
- 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.
249
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
243
250
 
244
251
  options : typing.Optional[GenerationOptions]
245
252
  additional options available for generation.
246
253
 
254
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
255
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
256
+
247
257
  webhook_url : typing.Optional[str]
248
258
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
249
259
 
@@ -285,6 +295,7 @@ class GenerationsClient:
285
295
  model=model,
286
296
  input=input,
287
297
  options=options,
298
+ segments=segments,
288
299
  webhook_url=webhook_url,
289
300
  output_file_name=output_file_name,
290
301
  request_options=request_options,
@@ -313,6 +324,7 @@ class AsyncGenerationsClient:
313
324
  model: Model,
314
325
  input: typing.Sequence[Input],
315
326
  options: typing.Optional[GenerationOptions] = OMIT,
327
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
316
328
  webhook_url: typing.Optional[str] = OMIT,
317
329
  output_file_name: typing.Optional[str] = OMIT,
318
330
  request_options: typing.Optional[RequestOptions] = None,
@@ -324,11 +336,14 @@ class AsyncGenerationsClient:
324
336
  name of the model to use for generation.
325
337
 
326
338
  input : typing.Sequence[Input]
327
- 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.
339
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
328
340
 
329
341
  options : typing.Optional[GenerationOptions]
330
342
  additional options available for generation.
331
343
 
344
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
345
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
346
+
332
347
  webhook_url : typing.Optional[str]
333
348
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
334
349
 
@@ -378,6 +393,7 @@ class AsyncGenerationsClient:
378
393
  model=model,
379
394
  input=input,
380
395
  options=options,
396
+ segments=segments,
381
397
  webhook_url=webhook_url,
382
398
  output_file_name=output_file_name,
383
399
  request_options=request_options,
@@ -533,6 +549,7 @@ class AsyncGenerationsClient:
533
549
  model: Model,
534
550
  input: typing.Sequence[Input],
535
551
  options: typing.Optional[GenerationOptions] = OMIT,
552
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
536
553
  webhook_url: typing.Optional[str] = OMIT,
537
554
  output_file_name: typing.Optional[str] = OMIT,
538
555
  request_options: typing.Optional[RequestOptions] = None,
@@ -544,11 +561,14 @@ class AsyncGenerationsClient:
544
561
  name of the model to use for generation.
545
562
 
546
563
  input : typing.Sequence[Input]
547
- 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.
564
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
548
565
 
549
566
  options : typing.Optional[GenerationOptions]
550
567
  additional options available for generation.
551
568
 
569
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
570
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
571
+
552
572
  webhook_url : typing.Optional[str]
553
573
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
554
574
 
@@ -598,6 +618,7 @@ class AsyncGenerationsClient:
598
618
  model=model,
599
619
  input=input,
600
620
  options=options,
621
+ segments=segments,
601
622
  webhook_url=webhook_url,
602
623
  output_file_name=output_file_name,
603
624
  request_options=request_options,
@@ -5,6 +5,7 @@ from ..core.client_wrapper import SyncClientWrapper
5
5
  from ..common.types.model import Model
6
6
  from ..common.types.input import Input
7
7
  from ..common.types.generation_options import GenerationOptions
8
+ from ..common.types.generation_segment import GenerationSegment
8
9
  from ..core.request_options import RequestOptions
9
10
  from ..core.http_response import HttpResponse
10
11
  from ..common.types.generation import Generation
@@ -39,6 +40,7 @@ class RawGenerationsClient:
39
40
  model: Model,
40
41
  input: typing.Sequence[Input],
41
42
  options: typing.Optional[GenerationOptions] = OMIT,
43
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
42
44
  webhook_url: typing.Optional[str] = OMIT,
43
45
  output_file_name: typing.Optional[str] = OMIT,
44
46
  request_options: typing.Optional[RequestOptions] = None,
@@ -50,11 +52,14 @@ class RawGenerationsClient:
50
52
  name of the model to use for generation.
51
53
 
52
54
  input : typing.Sequence[Input]
53
- 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.
55
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
54
56
 
55
57
  options : typing.Optional[GenerationOptions]
56
58
  additional options available for generation.
57
59
 
60
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
61
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
62
+
58
63
  webhook_url : typing.Optional[str]
59
64
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
60
65
 
@@ -80,6 +85,9 @@ class RawGenerationsClient:
80
85
  "options": convert_and_respect_annotation_metadata(
81
86
  object_=options, annotation=GenerationOptions, direction="write"
82
87
  ),
88
+ "segments": convert_and_respect_annotation_metadata(
89
+ object_=segments, annotation=typing.Sequence[GenerationSegment], direction="write"
90
+ ),
83
91
  "webhookUrl": webhook_url,
84
92
  "outputFileName": output_file_name,
85
93
  },
@@ -364,6 +372,7 @@ class RawGenerationsClient:
364
372
  model: Model,
365
373
  input: typing.Sequence[Input],
366
374
  options: typing.Optional[GenerationOptions] = OMIT,
375
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
367
376
  webhook_url: typing.Optional[str] = OMIT,
368
377
  output_file_name: typing.Optional[str] = OMIT,
369
378
  request_options: typing.Optional[RequestOptions] = None,
@@ -375,11 +384,14 @@ class RawGenerationsClient:
375
384
  name of the model to use for generation.
376
385
 
377
386
  input : typing.Sequence[Input]
378
- 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.
387
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
379
388
 
380
389
  options : typing.Optional[GenerationOptions]
381
390
  additional options available for generation.
382
391
 
392
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
393
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
394
+
383
395
  webhook_url : typing.Optional[str]
384
396
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
385
397
 
@@ -405,6 +417,9 @@ class RawGenerationsClient:
405
417
  "options": convert_and_respect_annotation_metadata(
406
418
  object_=options, annotation=GenerationOptions, direction="write"
407
419
  ),
420
+ "segments": convert_and_respect_annotation_metadata(
421
+ object_=segments, annotation=typing.Sequence[GenerationSegment], direction="write"
422
+ ),
408
423
  "webhookUrl": webhook_url,
409
424
  "outputFileName": output_file_name,
410
425
  },
@@ -457,6 +472,7 @@ class AsyncRawGenerationsClient:
457
472
  model: Model,
458
473
  input: typing.Sequence[Input],
459
474
  options: typing.Optional[GenerationOptions] = OMIT,
475
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
460
476
  webhook_url: typing.Optional[str] = OMIT,
461
477
  output_file_name: typing.Optional[str] = OMIT,
462
478
  request_options: typing.Optional[RequestOptions] = None,
@@ -468,11 +484,14 @@ class AsyncRawGenerationsClient:
468
484
  name of the model to use for generation.
469
485
 
470
486
  input : typing.Sequence[Input]
471
- 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.
487
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
472
488
 
473
489
  options : typing.Optional[GenerationOptions]
474
490
  additional options available for generation.
475
491
 
492
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
493
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
494
+
476
495
  webhook_url : typing.Optional[str]
477
496
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
478
497
 
@@ -498,6 +517,9 @@ class AsyncRawGenerationsClient:
498
517
  "options": convert_and_respect_annotation_metadata(
499
518
  object_=options, annotation=GenerationOptions, direction="write"
500
519
  ),
520
+ "segments": convert_and_respect_annotation_metadata(
521
+ object_=segments, annotation=typing.Sequence[GenerationSegment], direction="write"
522
+ ),
501
523
  "webhookUrl": webhook_url,
502
524
  "outputFileName": output_file_name,
503
525
  },
@@ -782,6 +804,7 @@ class AsyncRawGenerationsClient:
782
804
  model: Model,
783
805
  input: typing.Sequence[Input],
784
806
  options: typing.Optional[GenerationOptions] = OMIT,
807
+ segments: typing.Optional[typing.Sequence[GenerationSegment]] = OMIT,
785
808
  webhook_url: typing.Optional[str] = OMIT,
786
809
  output_file_name: typing.Optional[str] = OMIT,
787
810
  request_options: typing.Optional[RequestOptions] = None,
@@ -793,11 +816,14 @@ class AsyncRawGenerationsClient:
793
816
  name of the model to use for generation.
794
817
 
795
818
  input : typing.Sequence[Input]
796
- 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.
819
+ Array of input objects. Must include one video input item and at least 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. When using segments, multiple audio inputs can be provided with unique refId values.
797
820
 
798
821
  options : typing.Optional[GenerationOptions]
799
822
  additional options available for generation.
800
823
 
824
+ segments : typing.Optional[typing.Sequence[GenerationSegment]]
825
+ segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId.
826
+
801
827
  webhook_url : typing.Optional[str]
802
828
  webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
803
829
 
@@ -823,6 +849,9 @@ class AsyncRawGenerationsClient:
823
849
  "options": convert_and_respect_annotation_metadata(
824
850
  object_=options, annotation=GenerationOptions, direction="write"
825
851
  ),
852
+ "segments": convert_and_respect_annotation_metadata(
853
+ object_=segments, annotation=typing.Sequence[GenerationSegment], direction="write"
854
+ ),
826
855
  "webhookUrl": webhook_url,
827
856
  "outputFileName": output_file_name,
828
857
  },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes