Giter Club home page Giter Club logo

Comments (9)

alreadytaikeune avatar alreadytaikeune commented on May 22, 2024 8

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")

from spleeter.

headcloud avatar headcloud commented on May 22, 2024 4

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 #8 (comment) 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

from spleeter.

johndpope avatar johndpope commented on May 22, 2024 2

It seems logical the next step once you get the drum track out is to separate this into high hat / snare / kick layers.
This could be easily achieved by throwing different midi with different drum libraries
(There’s libraries that have high quality 230gb sounds. Apple logic has auto drumming which spit out endless possibilities.)

Using the custom training option
Given a json file

  • the different isolated drum stems (one was of high hats / snares / kicks )
  • the mixed down layer
    Run the training

Once trained this drum track model would allow

Given the drum track spat out from spleeter
Spit out the layers stems

This could be extrapolated to entire audio collection. Happy to help anyone who wants to embark on this. Seems like a spleeter2 kind of thing. Need to herd the cats to git branches so people don’t waste efforts.

from spleeter.

just-jeb avatar just-jeb commented on May 22, 2024 1

Gonna subscribe and +1 to drums/the rest separation.

from spleeter.

vinzo99 avatar vinzo99 commented on May 22, 2024 1

Can you please explain how to use this example with the spleeter command line with the python API ? Thanks

from spleeter.

just-jeb avatar just-jeb commented on May 22, 2024 1

Hey guys, any update on this? Will it be added to the command line interface anytime soon?

from spleeter.

JeffreyCA avatar JeffreyCA commented on May 22, 2024

@Faylixe @alreadytaikeune How do the changes in v1.4.4 affect how to do custom separation with spleeter? Does your comment #8 (comment) still hold true?

from spleeter.

Scylla2020 avatar Scylla2020 commented on May 22, 2024

@JeffreyCA Can custom separation also be specified when using the separate_to_file function?

from spleeter.

SpitFire-666 avatar SpitFire-666 commented on May 22, 2024

Perhaps another way of looking at this request is to remove/subtract a certain track. Eg karaoke mode where you just remove vocals, a mode for bassists where you keep everything but the bass.

This would be handy for myself and many other musos!

from spleeter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.