question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Support custom combination of music parts

See original GitHub issue

Currently spleeter supports three flavours of separation:

  • Vocals / accompaniment
  • Vocals / drums / bass / other
  • Vocals / drums / bass / piano / other

It would be really useful to be able to configure which specific parts to separate out.

For my use case, I want to be able to separate only the drums from the rest of the music, so after using spleeter I would get two parts: Vocals + instrumental w/o drums and the drum part.

Right now I can still achieve this with some manual work using the 4stems parameter and using software to merge the vocals, bass, and other parts together.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:9

github_iconTop GitHub Comments

7reactions
alreadytaikeunecommented, Nov 13, 2019

Hi Jeffrey, thanks for the feedback!

We’ll discuss adding support for custom separation in command line. In the meantime, you can achieve what you want by using the python API. Below is an example of how to export a track with the drum part left out.

from spleeter.utils.audio.adapter import get_default_audio_adapter
from spleeter.separator import Separator

# Using embedded configuration.
separator = Separator('spleeter:4stems')


audio_adapter = get_default_audio_adapter()
sample_rate = 44100
waveform, _ = audio_adapter.load('audio_example.mp3', sample_rate=sample_rate)
prediction = separator.separate(waveform)

# Now add up all that is not drums
out = prediction["vocals"]
for key in ["bass", "other"]:
    out += prediction[key]

audio_adapter.save("/output/track_without_drums.mp3", out, separator._sample_rate, "mp3", "128k")
4reactions
headcloudcommented, Apr 17, 2020

So, as long as we are waiting for upcoming release I forked the repo and added separate_drums command: https://github.com/headcloud/spleeter Solution is based on https://github.com/deezer/spleeter/issues/8#issuecomment-549121231 but allows to use familiar syntax:

spleeter separate_drums -i audio_example.mp3 -o output

It does uses 4stems separation and saves result in 2 output files

  • mix.{codec}
  • drums.{codec}

after cloning forked repository and installing according the readme should work e.g: python -m spleeter separate_drums -i ~/spleeter/some.mp3 -o ~/spleeter/output -c mp3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Requests - Audacity Wiki
This is our Feature Requests page where suggestions from users to enhance or add ... Support "Use Custom Mix" (6 votes); Remaining time...
Read more >
Latest Feature requests topics
Topic Replies Views Activity About the Feature requests category · handled 0 166 January 20, 2022 Display 2 informations in list view? implemented 0 23...
Read more >
How do I submit my 'Feature Request'?
1. Select a track or leave unselected for the whole release to be considered. · 2. Add noteworthy information. E.g. DJ, radio, podcast,...
Read more >
Social recommendations in playlists
Blend is a shared playlist that combines the music you and other people in the Blend listen to. It updates daily with songs...
Read more >
Feature Requests - Kadence Blocks
There are lots of combinations to add pre writed codes like svg upload, duplicate page and post, disable plugins… and other custom php,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found