Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.6.0"
".": "5.7.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 50
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-a3fa61e8bca261af3c51886ce551ccb5442a8c34758a00433e0002acace60acd.yml
openapi_spec_hash: 930007b00f9d434127cba847bd5c4a8e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runwayml/runwayml-6891f36f2cfa06dc53ee188ca0ab127f30f849d15ac7cf45d4a1eb27c9ab3868.yml
openapi_spec_hash: e2e91001c6f699c4fbe971c44043950f
config_hash: 955a0e451964a44778c5c0f54ca1c994
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.7.0 (2026-07-06)

Full Changelog: [v5.6.0...v5.7.0](https://github.com/runwayml/sdk-python/compare/v5.6.0...v5.7.0)

### Features

* **api:** add seed_audio model ([f1def20](https://github.com/runwayml/sdk-python/commit/f1def200362842d3bd5ea611527be894e65babf6))

## 5.6.0 (2026-07-06)

Full Changelog: [v5.5.0...v5.6.0](https://github.com/runwayml/sdk-python/compare/v5.5.0...v5.6.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runwayml"
version = "5.6.0"
version = "5.7.0"
description = "The official Python library for the runwayml API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/runwayml/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "runwayml"
__version__ = "5.6.0" # x-release-please-version
__version__ = "5.7.0" # x-release-please-version
168 changes: 165 additions & 3 deletions src/runwayml/resources/sound_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from __future__ import annotations

from typing_extensions import Literal
from typing_extensions import Literal, overload

import httpx

from ..types import sound_effect_create_params
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from .._utils import required_args, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import (
Expand Down Expand Up @@ -51,6 +51,58 @@ def with_streaming_response(self) -> SoundEffectResourceWithStreamingResponse:
"""
return SoundEffectResourceWithStreamingResponse(self)

@overload
def create(
self,
*,
model: Literal["seed_audio"],
prompt_text: str,
loudness_rate: int | Omit = omit,
output_format: Literal["wav", "mp3", "ogg_opus"] | Omit = omit,
pitch_rate: int | Omit = omit,
reference_audios: SequenceNotStr[str] | Omit = omit,
sample_rate: Literal[8000, 16000, 24000, 32000, 44100, 48000] | Omit = omit,
speech_rate: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> NewTaskCreatedResponse:
"""
This endpoint will start a new task to generate sound effects from a text
description.

Args:
prompt_text: A non-empty text prompt. For text-to-speech, the words to speak. For
text-to-audio, a scene description that can include voice direction, dialogue,
music, and sound effects.

loudness_rate: Relative output loudness. Negative is quieter, positive is louder; 0 is normal.

output_format: Output audio container/format.

pitch_rate: Pitch shift in semitones. Negative lowers, positive raises; 0 is unchanged.

reference_audios: Up to three reference audio clips. When provided, reference them in promptText
as @Audio1, @Audio2, and @Audio3 in order.

sample_rate: Output sample rate in Hz.

speech_rate: Relative speech speed. Negative is slower, positive is faster; 0 is normal.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
...

@overload
def create(
self,
*,
Expand Down Expand Up @@ -86,12 +138,41 @@ def create(

timeout: Override the client-level default timeout for this request, in seconds
"""
...

@required_args(["model", "prompt_text"])
def create(
self,
*,
model: Literal["seed_audio"] | Literal["eleven_text_to_sound_v2"],
prompt_text: str,
loudness_rate: int | Omit = omit,
output_format: Literal["wav", "mp3", "ogg_opus"] | Omit = omit,
pitch_rate: int | Omit = omit,
reference_audios: SequenceNotStr[str] | Omit = omit,
sample_rate: Literal[8000, 16000, 24000, 32000, 44100, 48000] | Omit = omit,
speech_rate: int | Omit = omit,
duration: float | Omit = omit,
loop: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> NewTaskCreatedResponse:
return self._post(
"/v1/sound_effect",
body=maybe_transform(
{
"model": model,
"prompt_text": prompt_text,
"loudness_rate": loudness_rate,
"output_format": output_format,
"pitch_rate": pitch_rate,
"reference_audios": reference_audios,
"sample_rate": sample_rate,
"speech_rate": speech_rate,
"duration": duration,
"loop": loop,
},
Expand Down Expand Up @@ -126,6 +207,58 @@ def with_streaming_response(self) -> AsyncSoundEffectResourceWithStreamingRespon
"""
return AsyncSoundEffectResourceWithStreamingResponse(self)

@overload
async def create(
self,
*,
model: Literal["seed_audio"],
prompt_text: str,
loudness_rate: int | Omit = omit,
output_format: Literal["wav", "mp3", "ogg_opus"] | Omit = omit,
pitch_rate: int | Omit = omit,
reference_audios: SequenceNotStr[str] | Omit = omit,
sample_rate: Literal[8000, 16000, 24000, 32000, 44100, 48000] | Omit = omit,
speech_rate: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncNewTaskCreatedResponse:
"""
This endpoint will start a new task to generate sound effects from a text
description.

Args:
prompt_text: A non-empty text prompt. For text-to-speech, the words to speak. For
text-to-audio, a scene description that can include voice direction, dialogue,
music, and sound effects.

loudness_rate: Relative output loudness. Negative is quieter, positive is louder; 0 is normal.

output_format: Output audio container/format.

pitch_rate: Pitch shift in semitones. Negative lowers, positive raises; 0 is unchanged.

reference_audios: Up to three reference audio clips. When provided, reference them in promptText
as @Audio1, @Audio2, and @Audio3 in order.

sample_rate: Output sample rate in Hz.

speech_rate: Relative speech speed. Negative is slower, positive is faster; 0 is normal.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
...

@overload
async def create(
self,
*,
Expand Down Expand Up @@ -161,12 +294,41 @@ async def create(

timeout: Override the client-level default timeout for this request, in seconds
"""
...

@required_args(["model", "prompt_text"])
async def create(
self,
*,
model: Literal["seed_audio"] | Literal["eleven_text_to_sound_v2"],
prompt_text: str,
loudness_rate: int | Omit = omit,
output_format: Literal["wav", "mp3", "ogg_opus"] | Omit = omit,
pitch_rate: int | Omit = omit,
reference_audios: SequenceNotStr[str] | Omit = omit,
sample_rate: Literal[8000, 16000, 24000, 32000, 44100, 48000] | Omit = omit,
speech_rate: int | Omit = omit,
duration: float | Omit = omit,
loop: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncNewTaskCreatedResponse:
return await self._post(
"/v1/sound_effect",
body=await async_maybe_transform(
{
"model": model,
"prompt_text": prompt_text,
"loudness_rate": loudness_rate,
"output_format": output_format,
"pitch_rate": pitch_rate,
"reference_audios": reference_audios,
"sample_rate": sample_rate,
"speech_rate": speech_rate,
"duration": duration,
"loop": loop,
},
Expand Down
Loading