feat: add isolate_vocals (async) support to video-to-music - #6
Merged
Conversation
Add an async submit()/generate_async() path to video-to-music, mirroring video-to-sfx's submit()+tasks.wait(). isolate_vocals=True requires mode="async" (auto-selected when mode is omitted); an explicit non-async mode with isolate_vocals raises SoniloError locally before any request. - New MusicAudioMedia/MusicTitle/MusicResult types for async music task results, since audio is a list for music (unlike SFX's single object); vocals reuses SfxMedia since its shape matches exactly. - Genericize Tasks/AsyncTasks.get()/wait() with an optional `parser`, defaulting to parse_sfx_result for back-compat, so callers can pass parse_music_result without duplicating the polling loop. - Existing stream()/generate() (plain video-to-music) are unchanged.
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 vocal-isolation support to video-to-music, mirroring the backend's new
isolate_vocalsflag.What
video_to_music.submit()andgenerate_async()— new async path on both sync and async clients; existingstream()/generate()unchanged.isolate_vocals,mode.MusicResult(audiolist +vocals+muxlist +title),MusicAudioMedia,MusicTitle, withsave()/asave()helpers.tasks.get()/wait()genericized via an optionalparser=arg (defaults to the SFX parser).isolate_vocals=Truewithout asyncmoderaises before any HTTP request (auto-selects async whenmodeis unset).Notes
_version.pywith pyproject; version bumped to 0.3.0.