Skip to content

Commit dfbd238

Browse files
committed
chore: sync from ark-apis 134e24deb3
Auto-generated SDK sync from ark-apis at 134e24deb3049eedc0b662695c34d4d71d299155. Generated files are overwritten by the sync pipeline and should not be edited by hand. Sync-Source-Commit: ce9eee3c5852a900472b52b5bf1cb93b4bd78c18 Ark-APIs-Commit: 134e24deb3049eedc0b662695c34d4d71d299155 Release-Version: 0.13.0
1 parent 05ceca7 commit dfbd238

51 files changed

Lines changed: 1154 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.0
1+
0.13.0

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "arkruntime"
7-
version = "0.12.0"
7+
version = "0.13.0"
88
description = "Ark runtime SDK for Python"
99
readme = "README.md"
1010
requires-python = ">=3.8"
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from .audio_config import AudioConfig
10+
from .audio_content import AudioContent
11+
from .audio_generation_request import AudioGenerationRequest
12+
from .audio_generation_response import AudioGenerationResponse
13+
from .audio_role import AudioRole
14+
from .audio_url import AudioURL
15+
from .content import Content
16+
from .dubbing_config import DubbingConfig
17+
from .effective_dubbing_config import EffectiveDubbingConfig
18+
from .error_response import ErrorResponse
19+
from .glossaries import Glossaries
20+
from .glossary import Glossary
21+
from .image_content import ImageContent
22+
from .image_url import ImageURL
23+
from .include import Include
24+
from .non_empty_string import NonEmptyString
25+
from .output_format import OutputFormat
26+
from .pitch_rate import PitchRate
27+
from .rate import Rate
28+
from .response_audio import ResponseAudio
29+
from .response_content import ResponseContent
30+
from .response_error import ResponseError
31+
from .response_subtitle import ResponseSubtitle
32+
from .sample_rate import SampleRate
33+
from .target_language import TargetLanguage
34+
from .text_content import TextContent
35+
from .usage import Usage
36+
from .video_content import VideoContent
37+
from .video_role import VideoRole
38+
from .video_url import VideoURL
39+
40+
__all__ = [
41+
"AudioConfig",
42+
"AudioContent",
43+
"AudioGenerationRequest",
44+
"AudioGenerationResponse",
45+
"AudioRole",
46+
"AudioURL",
47+
"Content",
48+
"DubbingConfig",
49+
"EffectiveDubbingConfig",
50+
"ErrorResponse",
51+
"Glossaries",
52+
"Glossary",
53+
"ImageContent",
54+
"ImageURL",
55+
"Include",
56+
"NonEmptyString",
57+
"OutputFormat",
58+
"PitchRate",
59+
"Rate",
60+
"ResponseAudio",
61+
"ResponseContent",
62+
"ResponseError",
63+
"ResponseSubtitle",
64+
"SampleRate",
65+
"TargetLanguage",
66+
"TextContent",
67+
"Usage",
68+
"VideoContent",
69+
"VideoRole",
70+
"VideoURL",
71+
]
72+
from .audio_config_param import AudioConfigParam
73+
from .audio_content_param import AudioContentParam
74+
from .audio_generation_request_param import AudioGenerationRequestParam
75+
from .audio_url_param import AudioURLParam
76+
from .content_param import ContentParam
77+
from .dubbing_config_param import DubbingConfigParam
78+
from .glossaries_param import GlossariesParam
79+
from .glossary_param import GlossaryParam
80+
from .image_content_param import ImageContentParam
81+
from .image_url_param import ImageURLParam
82+
from .non_empty_string_param import NonEmptyStringParam
83+
from .pitch_rate_param import PitchRateParam
84+
from .rate_param import RateParam
85+
from .text_content_param import TextContentParam
86+
from .video_content_param import VideoContentParam
87+
from .video_url_param import VideoURLParam
88+
89+
# Hand-written extras (preserved across regen via Makefile rsync --exclude=*_shim.py).
90+
from ._init_extras_shim import * # noqa: F401,F403
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
"""Hand-written extras shim for the audio_generation API (empty stub).
5+
6+
Preserved across regen via the Makefile rsync --exclude=*_shim.py rule.
7+
Add re-exports here as needed.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
__all__: list[str] = []
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import Optional
10+
11+
from arkruntime._models import BaseModel
12+
13+
from .pitch_rate import PitchRate
14+
from .rate import Rate
15+
from .sample_rate import SampleRate
16+
17+
18+
class AudioConfig(BaseModel):
19+
sample_rate: Optional[SampleRate] = None
20+
"""
21+
Defaults to 44100 for wav/mp3/pcm and 48000 for ogg_opus. ogg_opus only accepts 48000. Explicit zero is invalid.
22+
"""
23+
speech_rate: Optional[Rate] = None
24+
"""
25+
Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation, even when the value would be 0.
26+
"""
27+
loudness_rate: Optional[Rate] = None
28+
"""
29+
Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation.
30+
"""
31+
pitch_rate: Optional[PitchRate] = None
32+
"""
33+
Reference generation only. Default 0. Must be omitted (or null) for dubbing/separation.
34+
"""
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import Optional
10+
11+
from typing_extensions import TypedDict
12+
13+
from .pitch_rate_param import PitchRateParam
14+
from .rate_param import RateParam
15+
from .sample_rate import SampleRate
16+
17+
18+
class AudioConfigParam(TypedDict, total=False):
19+
sample_rate: Optional[Optional[SampleRate]]
20+
"""Defaults to 44100 for wav/mp3/pcm and 48000 for ogg_opus. ogg_opus only accepts 48000. Explicit zero is invalid."""
21+
22+
speech_rate: Optional[Optional[RateParam]]
23+
"""Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation, even when the value would be 0."""
24+
25+
loudness_rate: Optional[Optional[RateParam]]
26+
"""Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation."""
27+
28+
pitch_rate: Optional[Optional[PitchRateParam]]
29+
"""Reference generation only. Default 0. Must be omitted (or null) for dubbing/separation."""
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import Literal
10+
11+
from arkruntime._models import BaseModel
12+
13+
from .audio_role import AudioRole
14+
from .audio_url import AudioURL
15+
16+
17+
class AudioContent(BaseModel):
18+
type: Literal["audio_url"]
19+
audio_url: AudioURL
20+
role: AudioRole
21+
"""
22+
Required. reference_audio selects reference generation; separate_audio selects audio separation.
23+
"""
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import Literal
10+
11+
from typing_extensions import Required, TypedDict
12+
13+
from .audio_role import AudioRole
14+
from .audio_url_param import AudioURLParam
15+
16+
17+
class AudioContentParam(TypedDict, total=False):
18+
type: Required[Literal["audio_url"]]
19+
20+
audio_url: Required[AudioURLParam]
21+
22+
role: Required[AudioRole]
23+
"""Required. reference_audio selects reference generation; separate_audio selects audio separation."""
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import List, Optional
10+
11+
from typing_extensions import Annotated
12+
13+
from arkruntime._models import BaseModel
14+
from pydantic import Field
15+
16+
from .audio_config import AudioConfig
17+
from .content import Content
18+
from .dubbing_config import DubbingConfig
19+
from .include import Include
20+
from .non_empty_string import NonEmptyString
21+
from .output_format import OutputFormat
22+
23+
24+
class AudioGenerationRequest(BaseModel):
25+
"""
26+
Synchronous reference generation, audio separation or video dubbing.
27+
Static scene rules are attached to required content via dependentSchemas;
28+
media and deployment checks run on the server.
29+
"""
30+
31+
model: NonEmptyString
32+
"""
33+
Model ID or Endpoint ID. Whitespace-only values are rejected.
34+
"""
35+
content: Annotated[List[Content], Field(min_length=1)]
36+
dubbing_config: Optional[DubbingConfig] = None
37+
"""
38+
Required for dubbing; forbidden in reference generation and separation.
39+
"""
40+
output_format: Optional[OutputFormat] = "wav"
41+
"""
42+
Output audio format. Omitted or null resolves to wav.
43+
"""
44+
audio_config: Optional[AudioConfig] = None
45+
"""
46+
Optional output parameters. Defaults are applied by the service.
47+
"""
48+
include: Optional[List[Include]] = None
49+
"""
50+
Additional artifacts; omitted/null/empty means none. video_url requires a video input. subtitles_source.* is only allowed for dubbing. Separation forbids a non-empty include.
51+
"""
52+
watermark: Optional[bool] = False
53+
"""
54+
Append an audible rhythm watermark at the end. Defaults to false. Only supported in the cn-beijing deployment region; overseas deployments reject true with InvalidParameter (param=watermark).
55+
"""
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
2+
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
3+
#
4+
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
from __future__ import annotations
8+
9+
from typing import List, Optional
10+
11+
from typing_extensions import Required, TypedDict
12+
13+
from .audio_config_param import AudioConfigParam
14+
from .content_param import ContentParam
15+
from .dubbing_config_param import DubbingConfigParam
16+
from .include import Include
17+
from .non_empty_string_param import NonEmptyStringParam
18+
from .output_format import OutputFormat
19+
20+
21+
class AudioGenerationRequestParam(TypedDict, total=False):
22+
"""
23+
Synchronous reference generation, audio separation or video dubbing.
24+
Static scene rules are attached to required content via dependentSchemas;
25+
media and deployment checks run on the server.
26+
"""
27+
28+
model: Required[NonEmptyStringParam]
29+
"""Model ID or Endpoint ID. Whitespace-only values are rejected."""
30+
31+
content: Required[List[ContentParam]]
32+
33+
dubbing_config: Optional[Optional[DubbingConfigParam]]
34+
"""Required for dubbing; forbidden in reference generation and separation."""
35+
36+
output_format: Optional[Optional[OutputFormat]]
37+
"""Output audio format. Omitted or null resolves to wav."""
38+
39+
audio_config: Optional[Optional[AudioConfigParam]]
40+
"""Optional output parameters. Defaults are applied by the service."""
41+
42+
include: Optional[Optional[List[Include]]]
43+
"""Additional artifacts; omitted/null/empty means none. video_url requires a video input. subtitles_source.* is only allowed for dubbing. Separation forbids a non-empty include."""
44+
45+
watermark: Optional[Optional[bool]]
46+
"""Append an audible rhythm watermark at the end. Defaults to false. Only supported in the cn-beijing deployment region; overseas deployments reject true with InvalidParameter (param=watermark)."""

0 commit comments

Comments
 (0)