FakeYou-Tacotron2-Notebook icon indicating copy to clipboard operation
FakeYou-Tacotron2-Notebook copied to clipboard

ValueError: Cannot load file containing pickled data when allow_pickle=False

Open kzchen95 opened this issue 1 year ago • 5 comments

Getting this error when trying to train the model. Runtime error when first epoch starts. Changed the melspec = torch.from_numpy(np.load(filename)) to melspec = torch.from_numpy(np.load(filename, allow_pickle=True)) which still failed.

image

kzchen95 avatar Jul 14 '23 01:07 kzchen95

Ok, this issue is related to the issue of transcripts not generating properly: https://github.com/justinjohn0306/FakeYou-Tacotron2-Notebook/issues/15

I just changed the file paths in the list.txt file from .wav to .npy and it was resolved for me.

KyKhaw avatar Jul 19 '23 08:07 KyKhaw

Ok, this issue is related to the issue of transcripts not generating properly: #15

I just changed the file paths in the list.txt file from .wav to .npy and it was resolved for me.

Stuck here too. Is that all you did, just change the list.txt file? I tried that and got FileNotFoundError. I tried changing the actual .wav files as well (renamed them all .npy instead of .wav) but that gives me the same pickled data issue.

jooshwa avatar Aug 01 '23 00:08 jooshwa

Your .wav file should already have the .npy versions along with it. Did you run cell 6 to convert .wav files into mel spectrograms? Also be sure to change ALL filepaths in the list.txt file to .npy

KyKhaw avatar Aug 01 '23 01:08 KyKhaw

Your .wav file should already have the .npy versions along with it. Did you run cell 6 to convert .wav files into mel spectrograms? Also be sure to change ALL filepaths in the list.txt file to .npy

Changing the list.txt to .npy in file paths fixed the problem for me.

guidevops avatar Aug 17 '23 11:08 guidevops

I just discovered something: changing .npy to .wav causes the list.txt file to be saved empty. This happens because the function checks if the file referring to that transcription exists before saving the line in list.txt and the .npy file is only generated a few steps further.

guidevops avatar Aug 17 '23 12:08 guidevops