feat: mp3 output, video_to_sound output_format, v2v-music ducking + segments - #22
Merged
Merged
Conversation
…egments - output_format accepts 'mp3' (320 kbps) on text_to_music and video_to_music. The async gate widened with it: any container other than the m4a default is a finalize-time transcode, where the check previously named 'wav'. Without that, output_format='mp3' would have silently streamed and been ignored. - video_to_sound gains output_format (wav default), applying to the combined track only. video_to_video_sound does not take it -- that endpoint always returns an mp4 -- so build_v2s_parts takes it keyword-only and the video resource simply never passes it. - video_to_video_music gains ducking and segments. ducking is default-ON server-side, so it is omitted when unset rather than sent as 'false'. - Documents the v2v-music behavior change: the returned video's audio now carries the source speech with music ducked under it, the input must carry H.264/HEVC/VP9/AV1, and the limit is 360 seconds. sonilo 0.9.0 -> 0.10.0, sonilo-cli 0.6.0 -> 0.7.0.
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-cli pins the core package to one minor (>=0.8.0,<0.9), so bumping sonilo to 0.10.0 without moving the pin made the workspace unresolvable -- CI's editable install of all three packages failed with ResolutionImpossible. A pre-existing local venv hides this: pip only re-resolves on a fresh install, which is why the suite passed locally.
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.
Syncs the client with three API changes shipped in sonilo-api-dashboard (#191, #192, #195).
mp3output containertext_to_musicandvideo_to_musicacceptoutput_format="mp3"(320 kbps) alongside"m4a"and"wav".The async gate widened with it.
_resolve_music_modepreviously testedoutput_format == "wav"; any container other than them4adefault is a finalize-time transcode and needs async, so it now tests!= "m4a". Without that,output_format="mp3"would have silently streamed and been ignored — the new test confirms it: reverting just that line turnstest_non_m4a_formats_force_async[mp3]red.CLI
--formatacceptsmp3ontext-to-musicandvideo-to-music, and anything butm4aimplies async.video_to_soundgainsoutput_formatDefaults to
wav; applies to the combined music + SFX track only, since themusicandsfxstems keep their native formats.video_to_video_sounddoes not take it — that endpoint always muxes the mix into an mp4.build_v2s_partstakes it keyword-only with aNonedefault and theVideoToVideoSoundresource simply never passes it, sovideo_to_video_sound.pyis untouched by this PR.video_to_video_musicgainsducking+segmentsduckingis default-ON server-side, so it is omitted from the request when unset rather than sent as an explicit"false"— the same rulebuild_v2s_partsalready follows.segmentstakes the sameSegmentshape asvideo_to_musicand is JSON-serialized by the sharedbuild_v2m_parts.Added to
submit()andgenerate()on both the sync and async resources (four methods), withgenerate()forwarding both through.Behavior changes documented
/v1/video-to-video-musicwas rebuilt on the video-to-music pipeline plus a local ffmpeg mux, which changed three things users need to know, now in the README:ducking=Falserestores the old sound.Also fixed: version drift
src/sonilo/_version.pyandsonilo-cli/src/sonilo_cli/__init__.pycarry the version independently of theirpyproject.toml, and the existing test only asserts the client-identity header matches__version__— self-consistent, so it cannot catch the two drifting apart. Both are bumped here alongside the pyprojects; without that the published package would have reported the old version inX-Sonilo-Client-Version.Testing
226 tests pass (was 218). Eight new ones cover: wav and mp3 both forcing async, m4a still streaming,
output_formatemitted and omitted on video-to-sound,duckingomitted when unset,ducking=Falseon the wire, and segments JSON serialization.sonilo0.9.0 → 0.10.0,sonilo-cli0.6.0 → 0.7.0. Not tagged — this PR is for review only.🤖 Generated with Claude Code
https://claude.ai/code/session_01MjRsj2vTCwnUQYRc7hP41D