Force the loading of the wav in synthesis using the AP sample rate to avoid breaking the demo

This commit is contained in:
Edresson 2020-07-30 19:48:27 -03:00 committed by erogol
parent 496a4be3e3
commit ae62efd9eb
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ def numpy_to_tf(np_array, dtype):
def compute_style_mel(style_wav, ap, cuda=False):
style_mel = torch.FloatTensor(ap.melspectrogram(
ap.load_wav(style_wav))).unsqueeze(0)
ap.load_wav(style_wav, sr=ap.sample_rate))).unsqueeze(0)
if cuda:
return style_mel.cuda()
return style_mel