tacotron stft - loosen bounds restrictions and clip
This commit is contained in:
parent
f8631ad4f7
commit
9767260c6c
|
@ -70,11 +70,12 @@ class TacotronSTFT(torch.nn.Module):
|
||||||
-------
|
-------
|
||||||
mel_output: torch.FloatTensor of shape (B, n_mel_channels, T)
|
mel_output: torch.FloatTensor of shape (B, n_mel_channels, T)
|
||||||
"""
|
"""
|
||||||
assert(torch.min(y.data) >= -1)
|
assert(torch.min(y.data) >= -10)
|
||||||
assert(torch.max(y.data) <= 1)
|
assert(torch.max(y.data) <= 10)
|
||||||
|
y = torch.clip(y, min=-1, max=1)
|
||||||
|
|
||||||
magnitudes, phases = self.stft_fn.transform(y)
|
magnitudes, phases = self.stft_fn.transform(y)
|
||||||
magnitudes = magnitudes.data
|
magnitudes = magnitudes.data
|
||||||
mel_output = torch.matmul(self.mel_basis, magnitudes)
|
mel_output = torch.matmul(self.mel_basis, magnitudes)
|
||||||
mel_output = self.spectral_normalize(mel_output)
|
mel_output = self.spectral_normalize(mel_output)
|
||||||
return mel_output
|
return mel_output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user