feat: video-to-sound and video-to-video-sound endpoints (0.5.0) - #11
Merged
Conversation
Sapient docs evalsWaiting 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: |
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withsubmit()/generate(). The two endpoints take the identical form, so they sharebuild_v2s_parts:videoXORvideo_url,music_prompt,sfx_prompt,segments,preserve_speech,ducking. Booleans are only emitted when explicitly passed, so an unsetduckingkeeps the server-side default (on).New
SoundResultdataclass. Unlike the other endpoints, these return the flat envelopeaudio_duckinguses — the mixed result is a bareoutput_url(kind announced byoutput_type), alongsidemusic/music_processed/sfxstems. It exposessave()/asave()for the mixed result andsave_stem()/asave_stem()for the individual stems.The legacy
isolate_vocalsalias 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
output_bytesmatched the downloaded byte count exactly, andsave/save_stem/asaveall wrote correct files.🤖 Generated with Claude Code