facebookresearch / demucs

Code for the paper Hybrid Spectrogram and Waveform Source Separation
MIT License
8.26k stars 1.05k forks source link

New dataset and voice separation #93

Closed baijintong closed 4 years ago

baijintong commented 4 years ago

Hello, I am a student doing this research. I want to ask: if I want to add a new dataset, how should I set it up? There is no need to separate multiple stems, only separate voice and accompaniment where to change the code?Thank you very much.

adefossez commented 4 years ago

@baijintong , sorry for my lack of reply. The 4 source setup is hard coded in quite a few places. In compressed.py line 60, you need to sum the sources for the sources others than vocals and return a tensor of size 3 on the second dim, with index 0 being the mixture, 1 the accompaniment and 2 the vocals. In __main__.py line 99, change sources=4 to 2. Then in test.py you need to do the same thing as in compressed.py, summing manually the drums, bass and other and replace source_names on line 38 by ["accompaniment", "vocals"]. I think this covers everything.