add input wav and delay time monitor (#1295)

This commit is contained in:
yxlllc
2023-09-21 22:17:06 +08:00
committed by GitHub
parent a47aad5a3c
commit ac1397f3f9
2 changed files with 63 additions and 29 deletions

View File

@@ -211,13 +211,6 @@ class TorchGate(torch.nn.Module):
Returns:
torch.Tensor: The denoised audio signal, with the same shape as the input signal.
"""
assert x.ndim == 2
if x.shape[-1] < self.win_length * 2:
raise Exception(f"x must be bigger than {self.win_length * 2}")
assert xn is None or xn.ndim == 1 or xn.ndim == 2
if xn is not None and xn.shape[-1] < self.win_length * 2:
raise Exception(f"xn must be bigger than {self.win_length * 2}")
# Compute short-time Fourier transform (STFT)
X = torch.stft(