Spaces:
Sleeping
Sleeping
Update egs/visinger2/models.py
Browse files- egs/visinger2/models.py +2 -2
egs/visinger2/models.py
CHANGED
|
@@ -582,8 +582,8 @@ 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 |
-
istft_x = torch.
|
| 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.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=True)
|
| 586 |
+
istft_x = torch.view_as_real(istft_x)
|
| 587 |
|
| 588 |
return istft_x.unsqueeze(1)
|
| 589 |
|