Skip to content

Instantly share code, notes, and snippets.

@korakot
Last active December 5, 2021 06:35
Show Gist options
  • Select an option

  • Save korakot/ef2f16cb1f0f548a6647b0a3050479f6 to your computer and use it in GitHub Desktop.

Select an option

Save korakot/ef2f16cb1f0f548a6647b0a3050479f6 to your computer and use it in GitHub Desktop.
Separate vocals from a song (no music) with demucs
# install
!npx degit facebookresearch/demucs -f
!pip install lameenc==1.2.2 musdb==0.3.1 museval==0.3.0 treetable==0.2.3
# separate
!python3 -m demucs.separate --dl -n demucs_extra song.m4a
# get separated/demucs_extra/song/vocals.wav
'an easy-to-use function'
def get_voc(fname):
from pathlib import Path
name = Path(fname).stem
!python3 -m demucs.separate --dl -n demucs_extra {fname}
return f'separated/demucs_extra/{name}/vocals.wav'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment