Comments (9)
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.
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.
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.
Gonna subscribe and +1 to drums/the rest separation.
from spleeter.
Can you please explain how to use this example with the spleeter command line with the python API ? Thanks
from spleeter.
Hey guys, any update on this? Will it be added to the command line interface anytime soon?
from spleeter.
@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.
@JeffreyCA Can custom separation also be specified when using the separate_to_file function?
from spleeter.
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)
- How to batch process audio files on spleeter?
- [Bug] Unable to install spleeter on Macbook running M1 chips because of old numpy version !!! HOT 1
- Doesn't Work with Sonoma HOT 2
- [Bug] Version 3.12 compatible
- Regarding the use of separate_to_file, a deprecation warning is prompted! HOT 1
- Cannot do `poetry add spleeter` due to `tensorflow-io-gcs-filesystem` error
- [Discussion] your question HOT 1
- [Feature] your feature name
- I created web UI. You can have it
- [Bug] Fail to install (with python 3.10.13) HOT 3
- Install fail on macOS Sonoma 14.2, on Apple M2 laptop HOT 4
- Why is the audio unchanged after separation? HOT 5
- Index Error
- [Discussion] cuda memory optimisation issues
- [Feature] Create a Docker image for Apple Silicon
- [Discussion] Is there any way to release memory after separating is done?? HOT 2
- How to use 2stems-finetune?
- [Discussion] license for model weights
- AssertionError: Nesting violated for default stack of <class 'tensorflow.python.framework.ops.Graph'> objects
- Separator failing with "Trying to set the stream twice. This isn't supported. "
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spleeter.