mirror of
https://github.com/wassname/TTS.git
synced 2026-10-27 12:30:27 +08:00
Force the loading of the wav in synthesis using the AP sample rate to avoid breaking the demo
This commit is contained in:
1 parent
496a4be3e3
commit
ae62efd9eb
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user