jik876 / hifi-gan

HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis
MIT License
1.96k stars 505 forks source link

Error when read wav files by using scipy.io.wavfile #89

Open hoang98long opened 3 years ago

hoang98long commented 3 years ago

When i start to run train.py and I have error when read wav file File "/usr/local/lib/python3.7/dist-packages/scipy/io/wavfile.py", line 323, in read return fs, data UnboundLocalError: local variable 'fs' referenced before assignment I read wavfile.py file and recognized that the function _read_data_chunk and _read_fmt_chunk cannot reachable so that the "fs" and "data" variables had no value because of the condition while fid.tell() < file_size: always false because fid.tell() == 12 while file_size == 8 when I printed them the value fid.tell() turn from 0 to 12 after line file_size, is_big_endian = _read_riff_chunk(fid)

Error in meldataset.py at def load_wav(full_path): sampling_rate, data = read(full_path) return data, sampling_rate

Can you help me fix this? Many thanks!

leminhnguyen commented 3 years ago

Did you solve the problem ? If not, please share the full trace logs, so me or someone can help you.