ertk.pytorch.utils.add_signal_awgn
- ertk.pytorch.utils.add_signal_awgn(x: Tensor, snr: float = 20) Tensor
Add additive white Gaussian noise (AWGN) to a signal or batch of signals.
- Parameters:
- x: torch.Tensor
Input tensor of shape (signal_len,) or (batch_size, signal_len).
- snr: float
Target signal-to-noise ratio.
- Returns:
- augmented: torch.Tensor
Augmented tensor of the same shape as the
x.