Add karaoke mode with on-demand vocal separation via Demucs #2

Open
maks wants to merge 2 commits from feature/karaoke-mode into master
Owner

When the user toggles karaoke mode on a Navidrome track, the backend
downloads the track, runs htdemucs (4-stem) via Demucs to separate
vocals, sums the non-vocal stems into an instrumental WAV, and caches
it under data/stems/. The Intel N150 iGPU (torch.xpu) is used when
available, falling back to CPU.

Three new API endpoints: GET/POST /api/karaoke/{id}/status|prepare|stream.
The frontend polls every 3s while processing, then seamlessly reloads
the track at the current playback position with the karaoke stream.
When karaoke first becomes ready, the NowPlaying panel auto-opens so
lyrics are visible for a full karaoke experience.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

When the user toggles karaoke mode on a Navidrome track, the backend downloads the track, runs htdemucs (4-stem) via Demucs to separate vocals, sums the non-vocal stems into an instrumental WAV, and caches it under data/stems/. The Intel N150 iGPU (torch.xpu) is used when available, falling back to CPU. Three new API endpoints: GET/POST /api/karaoke/{id}/status|prepare|stream. The frontend polls every 3s while processing, then seamlessly reloads the track at the current playback position with the karaoke stream. When karaoke first becomes ready, the NowPlaying panel auto-opens so lyrics are visible for a full karaoke experience. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add karaoke mode with on-demand vocal separation via Demucs
Some checks failed
CI / Backend (lint + type-check + test) (pull_request) Failing after 1m52s
CI / Frontend (lint + check + test) (pull_request) Has been cancelled
a91cfd3d00
When the user toggles karaoke mode on a Navidrome track, the backend
downloads the track, runs htdemucs (4-stem) via Demucs to separate
vocals, sums the non-vocal stems into an instrumental WAV, and caches
it under data/stems/. The Intel N150 iGPU (torch.xpu) is used when
available, falling back to CPU.

Three new API endpoints: GET/POST /api/karaoke/{id}/status|prepare|stream.
The frontend polls every 3s while processing, then seamlessly reloads
the track at the current playback position with the karaoke stream.
When karaoke first becomes ready, the NowPlaying panel auto-opens so
lyrics are visible for a full karaoke experience.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix audio loading: use demucs AudioFile instead of torchaudio.load
Some checks failed
CI / Backend (lint + type-check + test) (pull_request) Failing after 1m50s
CI / Frontend (lint + check + test) (pull_request) Successful in 3m1s
f8627c18da
torchaudio 2.x switched its default backend to torchcodec which is not
installed. demucs' own AudioFile uses ffmpeg internally and handles all
formats without extra dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Some checks failed
CI / Backend (lint + type-check + test) (pull_request) Failing after 1m50s
CI / Frontend (lint + check + test) (pull_request) Successful in 3m1s
This pull request has changes conflicting with the target branch.
  • backend/sonus/api/__init__.py
  • backend/sonus/config.py
  • frontend/src/lib/api.ts
  • frontend/src/lib/audio/player.ts
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/karaoke-mode:feature/karaoke-mode
git switch feature/karaoke-mode

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff feature/karaoke-mode
git switch feature/karaoke-mode
git rebase master
git switch master
git merge --ff-only feature/karaoke-mode
git switch feature/karaoke-mode
git rebase master
git switch master
git merge --no-ff feature/karaoke-mode
git switch master
git merge --squash feature/karaoke-mode
git switch master
git merge --ff-only feature/karaoke-mode
git switch master
git merge feature/karaoke-mode
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maks/sonus!2
No description provided.