espnet2.layers.augmentation.preemphasis
Less than 1 minute
espnet2.layers.augmentation.preemphasis
espnet2.layers.augmentation.preemphasis(waveform, sample_rate: int, coeff: float = 0.97)
Pre-emphasize a waveform along the time dimension.
y[i] = x[i] - coeff * x[i - 1]
- Parameters:
- waveform (torch.Tensor) – audio signal (…, time)
- sample_rate (int) – sampling rate in Hz (not used)
- coeff (float) – pre-emphasis coefficient. Typically between 0.0 and 1.0.
- Returns: pre-emphasized signal (…, time)
- Return type: ret (torch.Tensor)