facebookresearch / svoice

We provide a PyTorch implementation of the paper Voice Separation with an Unknown Number of Multiple Speakers In which, we present a new method for separating a mixed audio sequence, in which multiple voices speak simultaneously. The new method employs gated neural networks that are trained to separate the voices at multiple processing steps, while maintaining the speaker in each output channel fixed. A different model is trained for every number of possible speakers, and the model with the largest number of speakers is employed to select the actual number of speakers in a given sample. Our method greatly outperforms the current state of the art, which, as we show, is not competitive for more than two speakers.
Other
1.23k stars 178 forks source link

max() arg is an empty sequence #69

Closed joeoct93 closed 2 years ago

joeoct93 commented 2 years ago

I followed the instructions and I tried training for five sources, but I got the following error:

Some error happened Traceback (most recent call last): File "train.py", line 118, in main _main(args) File "train.py", line 112, in _main run(args) File "train.py", line 93, in run solver.train() File "/home/user1022/_SVoice3/svoice/solver.py", line 166, in train separate(self.args, self.model, self.samples_dir) File "/home/user1022/_SVoice3/svoice/separate.py", line 117, in separate for i, data in enumerate(tqdm.tqdm(eval_loader, ncols=120)): File "/home/user1022/anaconda3/envs/svoice5/lib/python3.7/site-packages/tqdm/std.py", line 1171, in iter for obj in iterable: File "/home/user1022/anaconda3/envs/svoice5/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in next data = self._next_data() File "/home/user1022/anaconda3/envs/svoice5/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/user1022/anaconda3/envs/svoice5/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/user1022/_SVoice3/svoice/data/data.py", line 176, in _collate_fn_eval for mix in mixtures], pad_value) File "/home/user1022/_SVoice3/svoice/data/data.py", line 202, in pad_list max_len = max(x.size(0) for x in xs) ValueError: max() arg is an empty sequence

I changed the bare minimum, by which I mean that I only added the new dataset and dataset.yaml and the json files, but I'm getting this. How can I solve this problem?

joeoct93 commented 2 years ago

Nevermind, I realized this happened because I didn't have the yaml mix_json and mix_dir correctly matching. Wish there were more specific demonstrations for the code, because this part tripped me up for days.