From 4a1a8f831a4ecce1075e3e473411f87bdb1a4394 Mon Sep 17 00:00:00 2001 From: r3dacted42 Date: Mon, 27 Nov 2023 19:19:02 +0530 Subject: [PATCH] Fix for Pytorch warning message Warning: (...)/torch/functional.py:650: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error. --- TTS/utils/audio/torch_transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/utils/audio/torch_transforms.py b/TTS/utils/audio/torch_transforms.py index fd40ebb0..d845070c 100644 --- a/TTS/utils/audio/torch_transforms.py +++ b/TTS/utils/audio/torch_transforms.py @@ -129,7 +129,7 @@ class TorchSTFT(nn.Module): # pylint: disable=abstract-method pad_mode="reflect", # compatible with audio.py normalized=self.normalized, onesided=True, - return_complex=False, + return_complex=True, ) M = o[:, :, :, 0] P = o[:, :, :, 1]