Skip to content

feat: add isolate_vocals (async) support to video-to-music - #6

Merged
spencer-zqian merged 2 commits into
mainfrom
feat/isolate-vocals
Jul 16, 2026
Merged

feat: add isolate_vocals (async) support to video-to-music#6
spencer-zqian merged 2 commits into
mainfrom
feat/isolate-vocals

Conversation

@spencer-zqian

Copy link
Copy Markdown
Contributor

Adds vocal-isolation support to video-to-music, mirroring the backend's new isolate_vocals flag.

What

  • video_to_music.submit() and generate_async() — new async path on both sync and async clients; existing stream()/generate() unchanged.
  • New params: isolate_vocals, mode.
  • New result types: MusicResult (audio list + vocals + mux list + title), MusicAudioMedia, MusicTitle, with save()/asave() helpers.
  • tasks.get()/wait() genericized via an optional parser= arg (defaults to the SFX parser).
  • Local guard: isolate_vocals=True without async mode raises before any HTTP request (auto-selects async when mode is unset).

Notes

  • Aligned the drifted _version.py with pyproject; version bumped to 0.3.0.
  • README updated; tests: 143 passing (sync + async).

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.
@spencer-zqian
spencer-zqian merged commit 6c6ac90 into main Jul 16, 2026
2 checks passed
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