From ae62efd9eb0820fd430514ca2fde3f8b80c0aad2 Mon Sep 17 00:00:00 2001 From: Edresson Date: Thu, 30 Jul 2020 19:48:27 -0300 Subject: [PATCH] Force the loading of the wav in synthesis using the AP sample rate to avoid breaking the demo --- mozilla_voice_tts/tts/utils/synthesis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla_voice_tts/tts/utils/synthesis.py b/mozilla_voice_tts/tts/utils/synthesis.py index 2f746533..0952c936 100644 --- a/mozilla_voice_tts/tts/utils/synthesis.py +++ b/mozilla_voice_tts/tts/utils/synthesis.py @@ -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