From dfbd2381a326447d524cc19ec02192f8e7a7a849 Mon Sep 17 00:00:00 2001 From: "ark-hand[bot]" Date: Thu, 15 Oct 2026 08:32:49 +0000 Subject: [PATCH] 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 --- VERSION | 2 +- pyproject.toml | 2 +- .../types/audio_generation/__init__.py | 90 +++++++++++++++++++ .../audio_generation/_init_extras_shim.py | 12 +++ .../types/audio_generation/audio_config.py | 34 +++++++ .../audio_generation/audio_config_param.py | 29 ++++++ .../types/audio_generation/audio_content.py | 23 +++++ .../audio_generation/audio_content_param.py | 23 +++++ .../audio_generation_request.py | 55 ++++++++++++ .../audio_generation_request_param.py | 46 ++++++++++ .../audio_generation_response.py | 47 ++++++++++ .../types/audio_generation/audio_role.py | 14 +++ .../types/audio_generation/audio_url.py | 18 ++++ .../types/audio_generation/audio_url_param.py | 17 ++++ .../types/audio_generation/content.py | 28 ++++++ .../types/audio_generation/content_param.py | 23 +++++ .../types/audio_generation/dubbing_config.py | 29 ++++++ .../audio_generation/dubbing_config_param.py | 26 ++++++ .../effective_dubbing_config.py | 19 ++++ .../types/audio_generation/error_response.py | 15 ++++ .../types/audio_generation/glossaries.py | 21 +++++ .../audio_generation/glossaries_param.py | 18 ++++ .../types/audio_generation/glossary.py | 16 ++++ .../types/audio_generation/glossary_param.py | 18 ++++ .../types/audio_generation/image_content.py | 22 +++++ .../audio_generation/image_content_param.py | 22 +++++ .../types/audio_generation/image_url.py | 18 ++++ .../types/audio_generation/image_url_param.py | 17 ++++ .../types/audio_generation/include.py | 21 +++++ .../audio_generation/non_empty_string.py | 24 +++++ .../non_empty_string_param.py | 15 ++++ .../types/audio_generation/output_format.py | 16 ++++ .../types/audio_generation/pitch_rate.py | 12 +++ .../audio_generation/pitch_rate_param.py | 12 +++ src/arkruntime/types/audio_generation/rate.py | 12 +++ .../types/audio_generation/rate_param.py | 12 +++ .../types/audio_generation/response_audio.py | 26 ++++++ .../audio_generation/response_content.py | 33 +++++++ .../types/audio_generation/response_error.py | 18 ++++ .../audio_generation/response_subtitle.py | 20 +++++ .../types/audio_generation/sample_rate.py | 22 +++++ .../types/audio_generation/target_language.py | 46 ++++++++++ .../types/audio_generation/text_content.py | 21 +++++ .../audio_generation/text_content_param.py | 20 +++++ .../types/audio_generation/usage.py | 26 ++++++ .../types/audio_generation/video_content.py | 23 +++++ .../audio_generation/video_content_param.py | 23 +++++ .../types/audio_generation/video_role.py | 14 +++ .../types/audio_generation/video_url.py | 18 ++++ .../types/audio_generation/video_url_param.py | 17 ++++ uv.lock | 2 +- 51 files changed, 1154 insertions(+), 3 deletions(-) create mode 100644 src/arkruntime/types/audio_generation/__init__.py create mode 100644 src/arkruntime/types/audio_generation/_init_extras_shim.py create mode 100644 src/arkruntime/types/audio_generation/audio_config.py create mode 100644 src/arkruntime/types/audio_generation/audio_config_param.py create mode 100644 src/arkruntime/types/audio_generation/audio_content.py create mode 100644 src/arkruntime/types/audio_generation/audio_content_param.py create mode 100644 src/arkruntime/types/audio_generation/audio_generation_request.py create mode 100644 src/arkruntime/types/audio_generation/audio_generation_request_param.py create mode 100644 src/arkruntime/types/audio_generation/audio_generation_response.py create mode 100644 src/arkruntime/types/audio_generation/audio_role.py create mode 100644 src/arkruntime/types/audio_generation/audio_url.py create mode 100644 src/arkruntime/types/audio_generation/audio_url_param.py create mode 100644 src/arkruntime/types/audio_generation/content.py create mode 100644 src/arkruntime/types/audio_generation/content_param.py create mode 100644 src/arkruntime/types/audio_generation/dubbing_config.py create mode 100644 src/arkruntime/types/audio_generation/dubbing_config_param.py create mode 100644 src/arkruntime/types/audio_generation/effective_dubbing_config.py create mode 100644 src/arkruntime/types/audio_generation/error_response.py create mode 100644 src/arkruntime/types/audio_generation/glossaries.py create mode 100644 src/arkruntime/types/audio_generation/glossaries_param.py create mode 100644 src/arkruntime/types/audio_generation/glossary.py create mode 100644 src/arkruntime/types/audio_generation/glossary_param.py create mode 100644 src/arkruntime/types/audio_generation/image_content.py create mode 100644 src/arkruntime/types/audio_generation/image_content_param.py create mode 100644 src/arkruntime/types/audio_generation/image_url.py create mode 100644 src/arkruntime/types/audio_generation/image_url_param.py create mode 100644 src/arkruntime/types/audio_generation/include.py create mode 100644 src/arkruntime/types/audio_generation/non_empty_string.py create mode 100644 src/arkruntime/types/audio_generation/non_empty_string_param.py create mode 100644 src/arkruntime/types/audio_generation/output_format.py create mode 100644 src/arkruntime/types/audio_generation/pitch_rate.py create mode 100644 src/arkruntime/types/audio_generation/pitch_rate_param.py create mode 100644 src/arkruntime/types/audio_generation/rate.py create mode 100644 src/arkruntime/types/audio_generation/rate_param.py create mode 100644 src/arkruntime/types/audio_generation/response_audio.py create mode 100644 src/arkruntime/types/audio_generation/response_content.py create mode 100644 src/arkruntime/types/audio_generation/response_error.py create mode 100644 src/arkruntime/types/audio_generation/response_subtitle.py create mode 100644 src/arkruntime/types/audio_generation/sample_rate.py create mode 100644 src/arkruntime/types/audio_generation/target_language.py create mode 100644 src/arkruntime/types/audio_generation/text_content.py create mode 100644 src/arkruntime/types/audio_generation/text_content_param.py create mode 100644 src/arkruntime/types/audio_generation/usage.py create mode 100644 src/arkruntime/types/audio_generation/video_content.py create mode 100644 src/arkruntime/types/audio_generation/video_content_param.py create mode 100644 src/arkruntime/types/audio_generation/video_role.py create mode 100644 src/arkruntime/types/audio_generation/video_url.py create mode 100644 src/arkruntime/types/audio_generation/video_url_param.py diff --git a/VERSION b/VERSION index ac454c6..54d1a4f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.0 +0.13.0 diff --git a/pyproject.toml b/pyproject.toml index 1ec0604..919318d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "arkruntime" -version = "0.12.0" +version = "0.13.0" description = "Ark runtime SDK for Python" readme = "README.md" requires-python = ">=3.8" diff --git a/src/arkruntime/types/audio_generation/__init__.py b/src/arkruntime/types/audio_generation/__init__.py new file mode 100644 index 0000000..f6d60ae --- /dev/null +++ b/src/arkruntime/types/audio_generation/__init__.py @@ -0,0 +1,90 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from .audio_config import AudioConfig +from .audio_content import AudioContent +from .audio_generation_request import AudioGenerationRequest +from .audio_generation_response import AudioGenerationResponse +from .audio_role import AudioRole +from .audio_url import AudioURL +from .content import Content +from .dubbing_config import DubbingConfig +from .effective_dubbing_config import EffectiveDubbingConfig +from .error_response import ErrorResponse +from .glossaries import Glossaries +from .glossary import Glossary +from .image_content import ImageContent +from .image_url import ImageURL +from .include import Include +from .non_empty_string import NonEmptyString +from .output_format import OutputFormat +from .pitch_rate import PitchRate +from .rate import Rate +from .response_audio import ResponseAudio +from .response_content import ResponseContent +from .response_error import ResponseError +from .response_subtitle import ResponseSubtitle +from .sample_rate import SampleRate +from .target_language import TargetLanguage +from .text_content import TextContent +from .usage import Usage +from .video_content import VideoContent +from .video_role import VideoRole +from .video_url import VideoURL + +__all__ = [ + "AudioConfig", + "AudioContent", + "AudioGenerationRequest", + "AudioGenerationResponse", + "AudioRole", + "AudioURL", + "Content", + "DubbingConfig", + "EffectiveDubbingConfig", + "ErrorResponse", + "Glossaries", + "Glossary", + "ImageContent", + "ImageURL", + "Include", + "NonEmptyString", + "OutputFormat", + "PitchRate", + "Rate", + "ResponseAudio", + "ResponseContent", + "ResponseError", + "ResponseSubtitle", + "SampleRate", + "TargetLanguage", + "TextContent", + "Usage", + "VideoContent", + "VideoRole", + "VideoURL", +] +from .audio_config_param import AudioConfigParam +from .audio_content_param import AudioContentParam +from .audio_generation_request_param import AudioGenerationRequestParam +from .audio_url_param import AudioURLParam +from .content_param import ContentParam +from .dubbing_config_param import DubbingConfigParam +from .glossaries_param import GlossariesParam +from .glossary_param import GlossaryParam +from .image_content_param import ImageContentParam +from .image_url_param import ImageURLParam +from .non_empty_string_param import NonEmptyStringParam +from .pitch_rate_param import PitchRateParam +from .rate_param import RateParam +from .text_content_param import TextContentParam +from .video_content_param import VideoContentParam +from .video_url_param import VideoURLParam + +# Hand-written extras (preserved across regen via Makefile rsync --exclude=*_shim.py). +from ._init_extras_shim import * # noqa: F401,F403 diff --git a/src/arkruntime/types/audio_generation/_init_extras_shim.py b/src/arkruntime/types/audio_generation/_init_extras_shim.py new file mode 100644 index 0000000..63a1169 --- /dev/null +++ b/src/arkruntime/types/audio_generation/_init_extras_shim.py @@ -0,0 +1,12 @@ +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +"""Hand-written extras shim for the audio_generation API (empty stub). + +Preserved across regen via the Makefile rsync --exclude=*_shim.py rule. +Add re-exports here as needed. +""" + +from __future__ import annotations + +__all__: list[str] = [] diff --git a/src/arkruntime/types/audio_generation/audio_config.py b/src/arkruntime/types/audio_generation/audio_config.py new file mode 100644 index 0000000..2191c28 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_config.py @@ -0,0 +1,34 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from arkruntime._models import BaseModel + +from .pitch_rate import PitchRate +from .rate import Rate +from .sample_rate import SampleRate + + +class AudioConfig(BaseModel): + sample_rate: Optional[SampleRate] = None + """ + Defaults to 44100 for wav/mp3/pcm and 48000 for ogg_opus. ogg_opus only accepts 48000. Explicit zero is invalid. + """ + speech_rate: Optional[Rate] = None + """ + 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. + """ + loudness_rate: Optional[Rate] = None + """ + Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation. + """ + pitch_rate: Optional[PitchRate] = None + """ + Reference generation only. Default 0. Must be omitted (or null) for dubbing/separation. + """ diff --git a/src/arkruntime/types/audio_generation/audio_config_param.py b/src/arkruntime/types/audio_generation/audio_config_param.py new file mode 100644 index 0000000..45cfe4e --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_config_param.py @@ -0,0 +1,29 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from typing_extensions import TypedDict + +from .pitch_rate_param import PitchRateParam +from .rate_param import RateParam +from .sample_rate import SampleRate + + +class AudioConfigParam(TypedDict, total=False): + sample_rate: Optional[Optional[SampleRate]] + """Defaults to 44100 for wav/mp3/pcm and 48000 for ogg_opus. ogg_opus only accepts 48000. Explicit zero is invalid.""" + + speech_rate: Optional[Optional[RateParam]] + """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.""" + + loudness_rate: Optional[Optional[RateParam]] + """Reference generation only. Default 0; -50 means 0.5x and 100 means 2x. Must be omitted (or null) for dubbing/separation.""" + + pitch_rate: Optional[Optional[PitchRateParam]] + """Reference generation only. Default 0. Must be omitted (or null) for dubbing/separation.""" diff --git a/src/arkruntime/types/audio_generation/audio_content.py b/src/arkruntime/types/audio_generation/audio_content.py new file mode 100644 index 0000000..06bb0c7 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_content.py @@ -0,0 +1,23 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from arkruntime._models import BaseModel + +from .audio_role import AudioRole +from .audio_url import AudioURL + + +class AudioContent(BaseModel): + type: Literal["audio_url"] + audio_url: AudioURL + role: AudioRole + """ + Required. reference_audio selects reference generation; separate_audio selects audio separation. + """ diff --git a/src/arkruntime/types/audio_generation/audio_content_param.py b/src/arkruntime/types/audio_generation/audio_content_param.py new file mode 100644 index 0000000..85dee72 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_content_param.py @@ -0,0 +1,23 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from typing_extensions import Required, TypedDict + +from .audio_role import AudioRole +from .audio_url_param import AudioURLParam + + +class AudioContentParam(TypedDict, total=False): + type: Required[Literal["audio_url"]] + + audio_url: Required[AudioURLParam] + + role: Required[AudioRole] + """Required. reference_audio selects reference generation; separate_audio selects audio separation.""" diff --git a/src/arkruntime/types/audio_generation/audio_generation_request.py b/src/arkruntime/types/audio_generation/audio_generation_request.py new file mode 100644 index 0000000..bd14714 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_generation_request.py @@ -0,0 +1,55 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import List, Optional + +from typing_extensions import Annotated + +from arkruntime._models import BaseModel +from pydantic import Field + +from .audio_config import AudioConfig +from .content import Content +from .dubbing_config import DubbingConfig +from .include import Include +from .non_empty_string import NonEmptyString +from .output_format import OutputFormat + + +class AudioGenerationRequest(BaseModel): + """ + Synchronous reference generation, audio separation or video dubbing. + Static scene rules are attached to required content via dependentSchemas; + media and deployment checks run on the server. + """ + + model: NonEmptyString + """ + Model ID or Endpoint ID. Whitespace-only values are rejected. + """ + content: Annotated[List[Content], Field(min_length=1)] + dubbing_config: Optional[DubbingConfig] = None + """ + Required for dubbing; forbidden in reference generation and separation. + """ + output_format: Optional[OutputFormat] = "wav" + """ + Output audio format. Omitted or null resolves to wav. + """ + audio_config: Optional[AudioConfig] = None + """ + Optional output parameters. Defaults are applied by the service. + """ + include: Optional[List[Include]] = None + """ + 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. + """ + watermark: Optional[bool] = False + """ + 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). + """ diff --git a/src/arkruntime/types/audio_generation/audio_generation_request_param.py b/src/arkruntime/types/audio_generation/audio_generation_request_param.py new file mode 100644 index 0000000..041ff4d --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_generation_request_param.py @@ -0,0 +1,46 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import List, Optional + +from typing_extensions import Required, TypedDict + +from .audio_config_param import AudioConfigParam +from .content_param import ContentParam +from .dubbing_config_param import DubbingConfigParam +from .include import Include +from .non_empty_string_param import NonEmptyStringParam +from .output_format import OutputFormat + + +class AudioGenerationRequestParam(TypedDict, total=False): + """ + Synchronous reference generation, audio separation or video dubbing. + Static scene rules are attached to required content via dependentSchemas; + media and deployment checks run on the server. + """ + + model: Required[NonEmptyStringParam] + """Model ID or Endpoint ID. Whitespace-only values are rejected.""" + + content: Required[List[ContentParam]] + + dubbing_config: Optional[Optional[DubbingConfigParam]] + """Required for dubbing; forbidden in reference generation and separation.""" + + output_format: Optional[Optional[OutputFormat]] + """Output audio format. Omitted or null resolves to wav.""" + + audio_config: Optional[Optional[AudioConfigParam]] + """Optional output parameters. Defaults are applied by the service.""" + + include: Optional[Optional[List[Include]]] + """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.""" + + watermark: Optional[Optional[bool]] + """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).""" diff --git a/src/arkruntime/types/audio_generation/audio_generation_response.py b/src/arkruntime/types/audio_generation/audio_generation_response.py new file mode 100644 index 0000000..332b0d4 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_generation_response.py @@ -0,0 +1,47 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal, Optional + +from arkruntime._models import BaseModel + +from .audio_config import AudioConfig +from .effective_dubbing_config import EffectiveDubbingConfig +from .output_format import OutputFormat +from .response_content import ResponseContent +from .usage import Usage + + +class AudioGenerationResponse(BaseModel): + id: str + model: str + """ + Model name/version. Reference generation, audio separation and video dubbing using an agent plan return the brand model identifier; if resolution fails, the request model is returned instead of the underlying routed model. + """ + content: Optional[ResponseContent] = None + dubbing_config: Optional[EffectiveDubbingConfig] = None + """ + Effective dubbing configuration, when applicable. + """ + output_format: Optional[OutputFormat] = None + """ + Dubbing returns the effective format; other scenes echo the supplied request field. + """ + audio_config: Optional[AudioConfig] = None + """ + Dubbing returns the effective sample rate; other scenes echo the supplied request config. + """ + subtitle: Optional[Literal[False]] = None + """ + Separation explicitly returns false. Other scenes currently omit this field; inspect content.subtitles for subtitle artifacts. + """ + created: int + """ + Creation time, Unix seconds. + """ + usage: Optional[Usage] = None diff --git a/src/arkruntime/types/audio_generation/audio_role.py b/src/arkruntime/types/audio_generation/audio_role.py new file mode 100644 index 0000000..c7c47f3 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_role.py @@ -0,0 +1,14 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import Enum + + +class AudioRole(str, Enum): + reference_audio = "reference_audio" + separate_audio = "separate_audio" diff --git a/src/arkruntime/types/audio_generation/audio_url.py b/src/arkruntime/types/audio_generation/audio_url.py new file mode 100644 index 0000000..5c2c716 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_url.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .non_empty_string import NonEmptyString + + +class AudioURL(BaseModel): + url: NonEmptyString + """ + Public HTTP(S) URL, speaker://, file:// for registered reference audio, or data:audio/{wav,mp3};base64,. Decoded base64 audio is limited to 15 MiB for reference generation; separation uses a 90 MiB source-audio limit. A speaker reference cannot be used for separation. + """ diff --git a/src/arkruntime/types/audio_generation/audio_url_param.py b/src/arkruntime/types/audio_generation/audio_url_param.py new file mode 100644 index 0000000..3da0064 --- /dev/null +++ b/src/arkruntime/types/audio_generation/audio_url_param.py @@ -0,0 +1,17 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + + +from .non_empty_string_param import NonEmptyStringParam + + +class AudioURLParam(TypedDict, total=False): + url: Required[NonEmptyStringParam] + """Public HTTP(S) URL, speaker://, file:// for registered reference audio, or data:audio/{wav,mp3};base64,. Decoded base64 audio is limited to 15 MiB for reference generation; separation uses a 90 MiB source-audio limit. A speaker reference cannot be used for separation.""" diff --git a/src/arkruntime/types/audio_generation/content.py b/src/arkruntime/types/audio_generation/content.py new file mode 100644 index 0000000..a2c2803 --- /dev/null +++ b/src/arkruntime/types/audio_generation/content.py @@ -0,0 +1,28 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Union + +from pydantic import Field +from typing_extensions import Annotated, TypeAliasType + +from .audio_content import AudioContent +from .image_content import ImageContent +from .text_content import TextContent +from .video_content import VideoContent + +Content = TypeAliasType( + "Content", + Annotated[ + Union[TextContent, AudioContent, ImageContent, VideoContent], + Field(discriminator="type"), + ], +) +""" +A multimodal input with a payload matching its type discriminator. +""" diff --git a/src/arkruntime/types/audio_generation/content_param.py b/src/arkruntime/types/audio_generation/content_param.py new file mode 100644 index 0000000..50eb7f6 --- /dev/null +++ b/src/arkruntime/types/audio_generation/content_param.py @@ -0,0 +1,23 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Union + +from typing_extensions import TypeAlias + +from .audio_content_param import AudioContentParam +from .image_content_param import ImageContentParam +from .text_content_param import TextContentParam +from .video_content_param import VideoContentParam + +ContentParam: TypeAlias = Union[ + TextContentParam, AudioContentParam, ImageContentParam, VideoContentParam +] +""" +A multimodal input with a payload matching its type discriminator. +""" diff --git a/src/arkruntime/types/audio_generation/dubbing_config.py b/src/arkruntime/types/audio_generation/dubbing_config.py new file mode 100644 index 0000000..02b604f --- /dev/null +++ b/src/arkruntime/types/audio_generation/dubbing_config.py @@ -0,0 +1,29 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from arkruntime._models import BaseModel + +from .glossaries import Glossaries +from .target_language import TargetLanguage + + +class DubbingConfig(BaseModel): + """ + Source language is detected automatically. Do not send source_language: any non-null value, including an empty string, is rejected with InvalidParameter. + """ + + target_language: TargetLanguage + """ + Required for dubbing; accepted values match the dubbing validator. + """ + glossaries: Optional[Glossaries] = None + """ + Terminology pairs; source == target denotes a hotword. For duplicate sources, terminology overrides hotwords regardless of order; the last terminology target wins. + """ diff --git a/src/arkruntime/types/audio_generation/dubbing_config_param.py b/src/arkruntime/types/audio_generation/dubbing_config_param.py new file mode 100644 index 0000000..8a06f3b --- /dev/null +++ b/src/arkruntime/types/audio_generation/dubbing_config_param.py @@ -0,0 +1,26 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from typing_extensions import Required, TypedDict + +from .glossaries_param import GlossariesParam +from .target_language import TargetLanguage + + +class DubbingConfigParam(TypedDict, total=False): + """ + Source language is detected automatically. Do not send source_language: any non-null value, including an empty string, is rejected with InvalidParameter. + """ + + target_language: Required[TargetLanguage] + """Required for dubbing; accepted values match the dubbing validator.""" + + glossaries: Optional[Optional[GlossariesParam]] + """Terminology pairs; source == target denotes a hotword. For duplicate sources, terminology overrides hotwords regardless of order; the last terminology target wins.""" diff --git a/src/arkruntime/types/audio_generation/effective_dubbing_config.py b/src/arkruntime/types/audio_generation/effective_dubbing_config.py new file mode 100644 index 0000000..6a7b802 --- /dev/null +++ b/src/arkruntime/types/audio_generation/effective_dubbing_config.py @@ -0,0 +1,19 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .target_language import TargetLanguage + + +class EffectiveDubbingConfig(BaseModel): + """ + Effective target language. Source language and glossaries are not returned. + """ + + target_language: TargetLanguage diff --git a/src/arkruntime/types/audio_generation/error_response.py b/src/arkruntime/types/audio_generation/error_response.py new file mode 100644 index 0000000..b10fb9b --- /dev/null +++ b/src/arkruntime/types/audio_generation/error_response.py @@ -0,0 +1,15 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .response_error import ResponseError + + +class ErrorResponse(BaseModel): + error: ResponseError diff --git a/src/arkruntime/types/audio_generation/glossaries.py b/src/arkruntime/types/audio_generation/glossaries.py new file mode 100644 index 0000000..c1c05eb --- /dev/null +++ b/src/arkruntime/types/audio_generation/glossaries.py @@ -0,0 +1,21 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import List + +from pydantic import Field +from typing_extensions import Annotated, TypeAliasType + +from .glossary import Glossary + +Glossaries = TypeAliasType( + "Glossaries", Annotated[List[Glossary], Field(max_length=1000)] +) +""" +Up to 1000 input pairs, counted before duplicate sources are merged. +""" diff --git a/src/arkruntime/types/audio_generation/glossaries_param.py b/src/arkruntime/types/audio_generation/glossaries_param.py new file mode 100644 index 0000000..337b799 --- /dev/null +++ b/src/arkruntime/types/audio_generation/glossaries_param.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import List + +from typing_extensions import TypeAlias + +from .glossary_param import GlossaryParam + +GlossariesParam: TypeAlias = List[GlossaryParam] +""" +Up to 1000 input pairs, counted before duplicate sources are merged. +""" diff --git a/src/arkruntime/types/audio_generation/glossary.py b/src/arkruntime/types/audio_generation/glossary.py new file mode 100644 index 0000000..50e0e30 --- /dev/null +++ b/src/arkruntime/types/audio_generation/glossary.py @@ -0,0 +1,16 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .non_empty_string import NonEmptyString + + +class Glossary(BaseModel): + source: NonEmptyString + target: NonEmptyString diff --git a/src/arkruntime/types/audio_generation/glossary_param.py b/src/arkruntime/types/audio_generation/glossary_param.py new file mode 100644 index 0000000..e04a43d --- /dev/null +++ b/src/arkruntime/types/audio_generation/glossary_param.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + + +from .non_empty_string_param import NonEmptyStringParam + + +class GlossaryParam(TypedDict, total=False): + source: Required[NonEmptyStringParam] + + target: Required[NonEmptyStringParam] diff --git a/src/arkruntime/types/audio_generation/image_content.py b/src/arkruntime/types/audio_generation/image_content.py new file mode 100644 index 0000000..8888afc --- /dev/null +++ b/src/arkruntime/types/audio_generation/image_content.py @@ -0,0 +1,22 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from arkruntime._models import BaseModel + +from .image_url import ImageURL + + +class ImageContent(BaseModel): + type: Literal["image_url"] + image_url: ImageURL + role: Literal["reference_image"] + """ + Required. Must be reference_image. + """ diff --git a/src/arkruntime/types/audio_generation/image_content_param.py b/src/arkruntime/types/audio_generation/image_content_param.py new file mode 100644 index 0000000..a1e1f0f --- /dev/null +++ b/src/arkruntime/types/audio_generation/image_content_param.py @@ -0,0 +1,22 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from typing_extensions import Required, TypedDict + +from .image_url_param import ImageURLParam + + +class ImageContentParam(TypedDict, total=False): + type: Required[Literal["image_url"]] + + image_url: Required[ImageURLParam] + + role: Required[Literal["reference_image"]] + """Required. Must be reference_image.""" diff --git a/src/arkruntime/types/audio_generation/image_url.py b/src/arkruntime/types/audio_generation/image_url.py new file mode 100644 index 0000000..6159629 --- /dev/null +++ b/src/arkruntime/types/audio_generation/image_url.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .non_empty_string import NonEmptyString + + +class ImageURL(BaseModel): + url: NonEmptyString + """ + Public HTTP(S) URL or data:image/;base64,. Subtypes: jpeg, png, webp, bmp, tiff, gif, heic, heif (lowercase). Base64 images are limited to 10 MiB after decoding. + """ diff --git a/src/arkruntime/types/audio_generation/image_url_param.py b/src/arkruntime/types/audio_generation/image_url_param.py new file mode 100644 index 0000000..4d7506a --- /dev/null +++ b/src/arkruntime/types/audio_generation/image_url_param.py @@ -0,0 +1,17 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + + +from .non_empty_string_param import NonEmptyStringParam + + +class ImageURLParam(TypedDict, total=False): + url: Required[NonEmptyStringParam] + """Public HTTP(S) URL or data:image/;base64,. Subtypes: jpeg, png, webp, bmp, tiff, gif, heic, heif (lowercase). Base64 images are limited to 10 MiB after decoding.""" diff --git a/src/arkruntime/types/audio_generation/include.py b/src/arkruntime/types/audio_generation/include.py new file mode 100644 index 0000000..096692a --- /dev/null +++ b/src/arkruntime/types/audio_generation/include.py @@ -0,0 +1,21 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import Enum + + +class Include(str, Enum): + """ + Wire values use dots, unlike the underscores in the protobuf enum names. + """ + + video_url = "video_url" + subtitles_srt = "subtitles.srt" + subtitles_jsonl = "subtitles.jsonl" + subtitles_source_srt = "subtitles_source.srt" + subtitles_source_jsonl = "subtitles_source.jsonl" diff --git a/src/arkruntime/types/audio_generation/non_empty_string.py b/src/arkruntime/types/audio_generation/non_empty_string.py new file mode 100644 index 0000000..05ec21c --- /dev/null +++ b/src/arkruntime/types/audio_generation/non_empty_string.py @@ -0,0 +1,24 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from pydantic import Field +from typing_extensions import Annotated, TypeAliasType + +NonEmptyString = TypeAliasType( + "NonEmptyString", + Annotated[ + str, + Field( + min_length=1, + pattern="[^\\t\\n\\v\\f\\r \\u0085\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000]", + ), + ], +) +""" +Non-empty text. Whitespace-only strings are rejected by the server. +""" diff --git a/src/arkruntime/types/audio_generation/non_empty_string_param.py b/src/arkruntime/types/audio_generation/non_empty_string_param.py new file mode 100644 index 0000000..00efdb4 --- /dev/null +++ b/src/arkruntime/types/audio_generation/non_empty_string_param.py @@ -0,0 +1,15 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import TypeAlias + + +NonEmptyStringParam: TypeAlias = str +""" +Non-empty text. Whitespace-only strings are rejected by the server. +""" diff --git a/src/arkruntime/types/audio_generation/output_format.py b/src/arkruntime/types/audio_generation/output_format.py new file mode 100644 index 0000000..b5550c8 --- /dev/null +++ b/src/arkruntime/types/audio_generation/output_format.py @@ -0,0 +1,16 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import Enum + + +class OutputFormat(str, Enum): + wav = "wav" + mp3 = "mp3" + pcm = "pcm" + ogg_opus = "ogg_opus" diff --git a/src/arkruntime/types/audio_generation/pitch_rate.py b/src/arkruntime/types/audio_generation/pitch_rate.py new file mode 100644 index 0000000..e980967 --- /dev/null +++ b/src/arkruntime/types/audio_generation/pitch_rate.py @@ -0,0 +1,12 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from pydantic import Field +from typing_extensions import Annotated, TypeAliasType + +PitchRate = TypeAliasType("PitchRate", Annotated[int, Field(ge=-12, le=12)]) diff --git a/src/arkruntime/types/audio_generation/pitch_rate_param.py b/src/arkruntime/types/audio_generation/pitch_rate_param.py new file mode 100644 index 0000000..4c1c797 --- /dev/null +++ b/src/arkruntime/types/audio_generation/pitch_rate_param.py @@ -0,0 +1,12 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import TypeAlias + + +PitchRateParam: TypeAlias = int diff --git a/src/arkruntime/types/audio_generation/rate.py b/src/arkruntime/types/audio_generation/rate.py new file mode 100644 index 0000000..b435fed --- /dev/null +++ b/src/arkruntime/types/audio_generation/rate.py @@ -0,0 +1,12 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from pydantic import Field +from typing_extensions import Annotated, TypeAliasType + +Rate = TypeAliasType("Rate", Annotated[int, Field(ge=-50, le=100)]) diff --git a/src/arkruntime/types/audio_generation/rate_param.py b/src/arkruntime/types/audio_generation/rate_param.py new file mode 100644 index 0000000..6312085 --- /dev/null +++ b/src/arkruntime/types/audio_generation/rate_param.py @@ -0,0 +1,12 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import TypeAlias + + +RateParam: TypeAlias = int diff --git a/src/arkruntime/types/audio_generation/response_audio.py b/src/arkruntime/types/audio_generation/response_audio.py new file mode 100644 index 0000000..b3080aa --- /dev/null +++ b/src/arkruntime/types/audio_generation/response_audio.py @@ -0,0 +1,26 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from arkruntime._models import BaseModel + + +class ResponseAudio(BaseModel): + url: str + """ + Download URL. + """ + description: Optional[str] = None + """ + Description of a separated track. + """ + type: Optional[str] = None + """ + Separation track type, usually speaker, sfx or bgm. speaker_N is normalized to speaker; other model-defined labels are preserved. Omitted for reference generation and dubbing. + """ diff --git a/src/arkruntime/types/audio_generation/response_content.py b/src/arkruntime/types/audio_generation/response_content.py new file mode 100644 index 0000000..2538251 --- /dev/null +++ b/src/arkruntime/types/audio_generation/response_content.py @@ -0,0 +1,33 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import List, Optional + +from arkruntime._models import BaseModel + +from .response_audio import ResponseAudio +from .response_subtitle import ResponseSubtitle + + +class ResponseContent(BaseModel): + video_url: Optional[str] = None + """ + Generated video, when include contains video_url and the input has video. + """ + audios: Optional[List[ResponseAudio]] = None + """ + Reference generation returns one audio item containing only url. Dubbing also returns URL-only audio items. Separation returns items with url, type and description, without adding a mixed track. + """ + subtitles: Optional[List[ResponseSubtitle]] = None + """ + Generated-language subtitle files selected by include. + """ + subtitles_source: Optional[List[ResponseSubtitle]] = None + """ + Source-language subtitle files, for dubbing only. + """ diff --git a/src/arkruntime/types/audio_generation/response_error.py b/src/arkruntime/types/audio_generation/response_error.py new file mode 100644 index 0000000..873bc5a --- /dev/null +++ b/src/arkruntime/types/audio_generation/response_error.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from arkruntime._models import BaseModel + + +class ResponseError(BaseModel): + code: str + message: str + param: Optional[str] = None + type: Optional[str] = None diff --git a/src/arkruntime/types/audio_generation/response_subtitle.py b/src/arkruntime/types/audio_generation/response_subtitle.py new file mode 100644 index 0000000..b96fa36 --- /dev/null +++ b/src/arkruntime/types/audio_generation/response_subtitle.py @@ -0,0 +1,20 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + + +class ResponseSubtitle(BaseModel): + format: str + """ + Subtitle format: srt or jsonl. + """ + url: str + """ + Download URL. + """ diff --git a/src/arkruntime/types/audio_generation/sample_rate.py b/src/arkruntime/types/audio_generation/sample_rate.py new file mode 100644 index 0000000..fe864b7 --- /dev/null +++ b/src/arkruntime/types/audio_generation/sample_rate.py @@ -0,0 +1,22 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import IntEnum + + +class SampleRate(IntEnum): + """ + Supported sampling frequencies. Format pairing is enforced by the server. + """ + + integer_8000 = 8000 + integer_16000 = 16000 + integer_24000 = 24000 + integer_32000 = 32000 + integer_44100 = 44100 + integer_48000 = 48000 diff --git a/src/arkruntime/types/audio_generation/target_language.py b/src/arkruntime/types/audio_generation/target_language.py new file mode 100644 index 0000000..be8f613 --- /dev/null +++ b/src/arkruntime/types/audio_generation/target_language.py @@ -0,0 +1,46 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import Enum + + +class TargetLanguage(str, Enum): + """ + Accepted target languages in the dubbing validator. + """ + + zh = "zh" + en = "en" + ja = "ja" + ko = "ko" + es_mx = "es-MX" + de = "de" + fr = "fr" + pt_br = "pt-BR" + th = "th" + id = "id" + vi = "vi" + ms = "ms" + ar = "ar" + es_es = "es-ES" + pt_pt = "pt-PT" + fil = "fil" + it = "it" + ru = "ru" + nl = "nl" + pl = "pl" + tr = "tr" + sv = "sv" + fi = "fi" + da = "da" + no = "no" + cs = "cs" + hu = "hu" + el = "el" + ro = "ro" + hi = "hi" diff --git a/src/arkruntime/types/audio_generation/text_content.py b/src/arkruntime/types/audio_generation/text_content.py new file mode 100644 index 0000000..536819b --- /dev/null +++ b/src/arkruntime/types/audio_generation/text_content.py @@ -0,0 +1,21 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from arkruntime._models import BaseModel + +from .non_empty_string import NonEmptyString + + +class TextContent(BaseModel): + type: Literal["text"] + text: NonEmptyString + """ + Prompt, flattened as a string on the wire. The server truncates to 10,000 Unicode characters rather than rejecting longer text. Text cannot carry a role. + """ diff --git a/src/arkruntime/types/audio_generation/text_content_param.py b/src/arkruntime/types/audio_generation/text_content_param.py new file mode 100644 index 0000000..9e53a6a --- /dev/null +++ b/src/arkruntime/types/audio_generation/text_content_param.py @@ -0,0 +1,20 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from typing_extensions import Required, TypedDict + +from .non_empty_string_param import NonEmptyStringParam + + +class TextContentParam(TypedDict, total=False): + type: Required[Literal["text"]] + + text: Required[NonEmptyStringParam] + """Prompt, flattened as a string on the wire. The server truncates to 10,000 Unicode characters rather than rejecting longer text. Text cannot carry a role.""" diff --git a/src/arkruntime/types/audio_generation/usage.py b/src/arkruntime/types/audio_generation/usage.py new file mode 100644 index 0000000..4d83918 --- /dev/null +++ b/src/arkruntime/types/audio_generation/usage.py @@ -0,0 +1,26 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Optional + +from arkruntime._models import BaseModel + + +class Usage(BaseModel): + """ + Usage counters with zero values omitted by the protobuf JSON encoder. + """ + + duration_ms: Optional[int] = None + """ + Billed duration in milliseconds: accumulated original generation-model output duration for reference generation; sum of original model output durations across all separated tracks; CLA VOD output audio duration for dubbing. + """ + final_duration_ms: Optional[int] = None + """ + Delivered duration in milliseconds: final audio duration for reference generation/dubbing; sum of final durations across all separated tracks (not input duration or longest track). + """ diff --git a/src/arkruntime/types/audio_generation/video_content.py b/src/arkruntime/types/audio_generation/video_content.py new file mode 100644 index 0000000..456e0b6 --- /dev/null +++ b/src/arkruntime/types/audio_generation/video_content.py @@ -0,0 +1,23 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from arkruntime._models import BaseModel + +from .video_role import VideoRole +from .video_url import VideoURL + + +class VideoContent(BaseModel): + type: Literal["video_url"] + video_url: VideoURL + role: VideoRole + """ + Required. reference_video selects reference generation; dubbing_video selects video dubbing. + """ diff --git a/src/arkruntime/types/audio_generation/video_content_param.py b/src/arkruntime/types/audio_generation/video_content_param.py new file mode 100644 index 0000000..45a3e16 --- /dev/null +++ b/src/arkruntime/types/audio_generation/video_content_param.py @@ -0,0 +1,23 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing import Literal + +from typing_extensions import Required, TypedDict + +from .video_role import VideoRole +from .video_url_param import VideoURLParam + + +class VideoContentParam(TypedDict, total=False): + type: Required[Literal["video_url"]] + + video_url: Required[VideoURLParam] + + role: Required[VideoRole] + """Required. reference_video selects reference generation; dubbing_video selects video dubbing.""" diff --git a/src/arkruntime/types/audio_generation/video_role.py b/src/arkruntime/types/audio_generation/video_role.py new file mode 100644 index 0000000..d40c29f --- /dev/null +++ b/src/arkruntime/types/audio_generation/video_role.py @@ -0,0 +1,14 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from enum import Enum + + +class VideoRole(str, Enum): + reference_video = "reference_video" + dubbing_video = "dubbing_video" diff --git a/src/arkruntime/types/audio_generation/video_url.py b/src/arkruntime/types/audio_generation/video_url.py new file mode 100644 index 0000000..cba99e0 --- /dev/null +++ b/src/arkruntime/types/audio_generation/video_url.py @@ -0,0 +1,18 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from arkruntime._models import BaseModel + +from .non_empty_string import NonEmptyString + + +class VideoURL(BaseModel): + url: NonEmptyString + """ + Public HTTP(S) URL or tos:///. Base64 and speaker references are not supported. Media properties and size are validated by the server. + """ diff --git a/src/arkruntime/types/audio_generation/video_url_param.py b/src/arkruntime/types/audio_generation/video_url_param.py new file mode 100644 index 0000000..79923d4 --- /dev/null +++ b/src/arkruntime/types/audio_generation/video_url_param.py @@ -0,0 +1,17 @@ +# Generated by datamodel-code-generator from ark-apis typespec/openapi. +# DO NOT EDIT — regenerate with `make gen-py-` in ark-apis. +# +# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + + +from .non_empty_string_param import NonEmptyStringParam + + +class VideoURLParam(TypedDict, total=False): + url: Required[NonEmptyStringParam] + """Public HTTP(S) URL or tos:///. Base64 and speaker references are not supported. Media properties and size are validated by the server.""" diff --git a/uv.lock b/uv.lock index 7c0758b..e1c386b 100644 --- a/uv.lock +++ b/uv.lock @@ -79,7 +79,7 @@ wheels = [ [[package]] name = "arkruntime" -version = "0.12.0" +version = "0.13.0" source = { editable = "." } dependencies = [ { name = "anyio", version = "4.5.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },