Skip to content

feat: video-to-sound and video-to-video-sound endpoints (0.5.0) - #11

Merged
spencer-zqian merged 4 commits into
mainfrom
feat/video-to-sound
Jul 23, 2026
Merged

feat: video-to-sound and video-to-video-sound endpoints (0.5.0)#11
spencer-zqian merged 4 commits into
mainfrom
feat/video-to-sound

Conversation

@spencer-zqian

Copy link
Copy Markdown
Contributor

Adds SDK support for the two combined endpoints shipped in the API (POST /v1/video-to-sound, POST /v1/video-to-video-sound), which generate a music bed and sound effects for the same clip and return them mixed into a single soundtrack — one call and one charge instead of chaining two requests.

Changes

  • video_to_sound — returns the mixed audio track.
  • video_to_video_sound — returns the source video with that track muxed in.

Both ship a sync and an Async* class with submit() / generate(). The two endpoints take the identical form, so they share build_v2s_parts: video XOR video_url, music_prompt, sfx_prompt, segments, preserve_speech, ducking. Booleans are only emitted when explicitly passed, so an unset ducking keeps the server-side default (on).

New SoundResult dataclass. Unlike the other endpoints, these return the flat envelope audio_ducking uses — the mixed result is a bare output_url (kind announced by output_type), alongside music / music_processed / sfx stems. It exposes save() / asave() for the mixed result and save_stem() / asave_stem() for the individual stems.

The legacy isolate_vocals alias is deliberately not exposed — this is a new surface with no back-compat obligation.

README gains a "Video to sound" section and a "Free trial" section documenting the per-endpoint free runs self-serve accounts start with. Version bumped 0.4.0 -> 0.5.0.

Testing

  • 10 new unit tests; full suite 167/167 green.
  • Verified live against production with a 30s clip, through both the sync and async clients: both endpoints returned valid media (audio out = PCM 44.1 kHz stereo; video out = h264 + AAC muxed, duration preserved), output_bytes matched the downloaded byte count exactly, and save / save_stem / asave all wrote correct files.

🤖 Generated with Claude Code

@sapient-app

sapient-app Bot commented Jul 23, 2026

Copy link
Copy Markdown

Sapient docs evals

Waiting for the staging docs URL before running evals.

Sapient will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes.

Commit: 15f4d20
Status: waiting for staging docs URL

sonilo-video-kit pinned sonilo>=0.3,<0.5, so bumping the core package to
0.5.0 made the two packages unresolvable together — CI installs both
editable in one command and failed with ResolutionImpossible on every
matrix entry.

Widened to <0.6 and bumped video-kit to 0.1.1, since the 0.1.0 already on
PyPI carries the old ceiling: without a release, anyone installing
sonilo-video-kit alongside sonilo 0.5 hits the same conflict.

Verified by reproducing the CI install in a clean 3.12 venv:
pip install -e ".[dev]" -e "./sonilo-video-kit[dev]" resolves, and both
suites pass (167 + 52).
@spencer-zqian
spencer-zqian merged commit ef20411 into main Jul 23, 2026
2 checks passed
@spencer-zqian
spencer-zqian deleted the feat/video-to-sound branch July 23, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant