- torchaudio.functional.dcshift(waveform: Tensor, shift: float, limiter_gain: Optional[float] = None) Tensor ¶
Apply a DC shift to the audio. Similar to SoX implementation.
This can be useful to remove a DC offset (caused perhaps by a hardware problem in the recording chain) from the audio
waveform (Tensor) – audio waveform of dimension of (…, time)
shift (float) – indicates the amount to shift the audio Allowed range of values for shift : -2.0 to +2.0
limiter_gain (python:float of None, optional) – It is used only on peaks to prevent clipping It should have a value much less than 1 (e.g. 0.05 or 0.02)
Waveform of dimension of (…, time)
- Return type: