Spaces:
Running
Running
Update egs/visinger2/models.py
Browse files- egs/visinger2/models.py +3 -2
egs/visinger2/models.py
CHANGED
@@ -582,8 +582,9 @@ class Generator_Noise(torch.nn.Module):
|
|
582 |
real = amp * torch.cos(phase)
|
583 |
imag = amp * torch.sin(phase)
|
584 |
spec = torch.cat([real, imag], 3)
|
585 |
-
istft_x = torch.
|
586 |
-
|
|
|
587 |
|
588 |
return istft_x.unsqueeze(1)
|
589 |
|
|
|
582 |
real = amp * torch.cos(phase)
|
583 |
imag = amp * torch.sin(phase)
|
584 |
spec = torch.cat([real, imag], 3)
|
585 |
+
istft_x = torch.view_as_complex(istft_x)
|
586 |
+
|
587 |
+
istft_x = torch.istft(spec, self.fft_size, self.hop_size, self.win_size, self.window.to(amp), True, length=x.shape[2] * self.hop_size, return_complex=False)
|
588 |
|
589 |
return istft_x.unsqueeze(1)
|
590 |
|