Last active
December 5, 2021 06:35
-
-
Save korakot/ef2f16cb1f0f548a6647b0a3050479f6 to your computer and use it in GitHub Desktop.
Separate vocals from a song (no music) with demucs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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