Can I extract drums from a song with Librosa?

147 views
Skip to first unread message

Calin Enache

unread,
Jan 13, 2021, 2:49:04 PM1/13/21
to lib...@googlegroups.com
So there is function for plotting the spectrogram for percussive and harmonic sounds of a song but can I extract the percussive sounds as an audio file? Is there a possibility of reconstructing audio based on the spectrogram of the percussive spec or is there any alternative?

Brian McFee

unread,
Jan 13, 2021, 4:43:40 PM1/13/21
to librosa
The librosa.effects module provides wrappers to hpss that can give you the time domain signal instead of the spectrogram.

Hpss will do an okay job of separating drums, depending on the mix, but you might also want to look at pre trained source separation models like spleeter or open-unmix.
Reply all
Reply to author
Forward
0 new messages