auspicious3000/SpeechSplit

The program has an error message: ValueError: high <= 0

SeptemberN opened this issue · 2 comments

Very great work! It is a pleasure to communicate with you.
I got the following error when I used make_spect_f0.py and make_metadata.py to train the model after processing my own dataset and then using main.py. Have you encountered it and how can I fix it?

Traceback (most recent call last):
  File "/home/ubuntu/work/vc/solver.py", line 135, in train
    x_real_org, _, f0_org, len_org = next(data_iter)  
  File "/home/ubuntu/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/home/ubuntu/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/ubuntu/.local/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
    return self.collate_fn(data)
  File "/home/ubuntu/work/vc/data_loader.py", line 100, in __call__
    left = np.random.randint(0, len(aa) - len_crop[0], size=2)
  File "mtrand.pyx", line 748, in numpy.random.mtrand.RandomState.randint
  File "_bounded_integers.pyx", line 1247, in numpy.random._bounded_integers._rand_int64
ValueError: high <= 0

high <= 0 means len(aa) - len_crop[0] <=0, which probably means aa is too short

Thank you very much for your answer, I have successfully solved the problem