Fix annoying warning and add to requirements

This commit is contained in:
James Betker 2021-08-11 17:32:06 -06:00
parent f5a9b88ef6
commit 154f5aa73c
2 changed files with 3 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class TextMelLoader(torch.utils.data.Dataset):
if sampling_rate != self.input_sample_rate:
if sampling_rate < self.input_sample_rate:
print(f'{filename} has a sample rate of {sampling_rate} which is lower than the requested sample rate of {self.input_sample_rate}. This is not a good idea.')
audio = torch.nn.functional.interpolate(audio.unsqueeze(0).unsqueeze(1), scale_factor=self.input_sample_rate/sampling_rate, mode='area')#
audio = torch.nn.functional.interpolate(audio.unsqueeze(0).unsqueeze(1), scale_factor=self.input_sample_rate/sampling_rate, mode='area', recompute_scale_factor=False)
audio = (audio.squeeze().clip(-1,1)+1)/2
audio_norm = audio.unsqueeze(0)
audio_norm = torch.autograd.Variable(audio_norm, requires_grad=False)

View File

@ -29,4 +29,5 @@ inflect==0.2.5
librosa==0.6.0
Unidecode==1.0.22
tgt == 1.4.4
pyworld == 0.2.10
pyworld == 0.2.10
audio2numpy