chrisdonahue / wavegan

WaveGAN: Learn to synthesize raw audio with generative adversarial networks
MIT License
1.32k stars 283 forks source link

train_wavegan.py freezes at line 202 #55

Closed wenting-zhao closed 5 years ago

wenting-zhao commented 5 years ago

When I ran python train_wavegan.py train ./train_tmp --data_dir ./data/sc09/train/, it freezes at line 202, and ctrl-c won't kill it. Any ideas what might be happening here? Our conjecture is that there might be some issues with data loader, and were wondering if anybody else ran into this and may have a fix? Thanks!

Both tested on linux ubuntu and centOS, with python 3.5 and 3.6. Tested GPUs are Tesla V100 and P4000. All required packages are the same as written in README. All of the configs above freeze at the same point.

chrisdonahue commented 5 years ago

Yeah likely an issue with the data loader. I haven't run into this before. Are you sure the --data_dir path is right? What does the code say for print('Found {} audio files in specified directory'.format(len(fps)))? Did you try --data_fast_wav?

wenting-zhao commented 5 years ago

Thank you for your response! It prints "Found 18620 audio files in specified directory" Does this looks right to you? I did try --data_fast_wav, but it doesn't change anything.

chrisdonahue commented 5 years ago

I figured it out. It was a documentation error, sorry about that! I've updated the README

Try changing the command to: python train_wavegan.py train ./train_tmp --data_dir ./data/sc09/train/ --data_first_slice --data_pad_end --data_fast_wav

--data_first_slice ensures that only the leftmost slice from each audio file is used; --data_pad_end ensures that audio waveforms are padded to fill the training slice length; --data_fast_wav uses scipy instead of librosa to decode WAV files more quickly.

Feel free to reopen if that doesn't fix things.