CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
52.14k stars 8.72k forks source link

vocoder_dataset.py ValueError #1065

Closed chankl3579 closed 2 years ago

chankl3579 commented 2 years ago

I am trying to use the Librispeech dataset to train the vocoder. And I got a ValueError while training. numpy.random._bounded_integers._rand_int32 ValueError: low >= high

It occurs in line 61 of vocoder_dataset.py, mel_offsets = [np.random.randint(0, offset) for offset in max_offsets] So I assume there is something wrong with the value of offset? e.g. offset=0 so np.random.randint could not generate a number [0, 0)? Did anyone encountered this problem too?

chankl3579 commented 2 years ago

For anyone comes to this issue in the future: Somehow I guess the issue is that the length of some audio samples are too short. Please check the value of utterance_min_duration in synthesizer/hparams.py. I adjusted the value, preprocessed the training data again, and so far have trained the vocoder for more than 1 epoch without getting this error, so I consider my issue is solved.