-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I ran python3 prepare_data.py with my own data (22050, 16bit, mono), AssertionError occured.
HBox(children=(FloatProgress(value=0.0, max=28825.0), HTML(value='')))
Traceback (most recent call last):
File "prepare_data.py", line 103, in
text, char_seq, phone_seq, melspec, wav = save_file(k)
File "prepare_data.py", line 85, in save_file
melspec, wav = get_mel(wav_name)
File "prepare_data.py", line 75, in get_mel
melspec = stft.mel_spectrogram(wav.unsqueeze(0))
File "/works/Transformer-TTS/layers.py", line 72, in mel_spectrogram
assert(torch.min(y.data) >= -1)
AssertionError
Should I normalize wave data array into range [-1,1] before pass the array to FloatTensor in get_mel() function?
def get_mel(filename):
wav, sr = librosa.load(filename, sr=22050)
wav = torch.FloatTensor(wav.astype(np.float32))
melspec = stft.mel_spectrogram(wav.unsqueeze(0))