torchaudio.functional.phaser¶
- torchaudio.functional.phaser(waveform: Tensor, sample_rate: int, gain_in: float = 0.4, gain_out: float = 0.74, delay_ms: float = 3.0, decay: float = 0.4, mod_speed: float = 0.5, sinusoidal: bool = True) Tensor [source]¶
Apply a phasing effect to the audio. Similar to SoX implementation.
- Parameters:
waveform (Tensor) – audio waveform of dimension of (…, time)
sample_rate (int) – sampling rate of the waveform, e.g. 44100 (Hz)
gain_in (float, optional) – desired input gain at the boost (or attenuation) in dB Allowed range of values are 0 to 1
gain_out (float, optional) – desired output gain at the boost (or attenuation) in dB Allowed range of values are 0 to 1e9
delay_ms (float, optional) – desired delay in milliseconds Allowed range of values are 0 to 5.0
decay (float, optional) – desired decay relative to gain-in Allowed range of values are 0 to 0.99
mod_speed (float, optional) – modulation speed in Hz Allowed range of values are 0.1 to 2
sinusoidal (bool, optional) – If
True
, uses sinusoidal modulation (preferable for multiple instruments) IfFalse
, uses triangular modulation (gives single instruments a sharper phasing effect) (Default:True
)
- Returns:
Waveform of dimension of (…, time)
- Return type:
Tensor
- Reference:
Scott Lehman, Effects Explained.