torchaudio.functional.flanger¶
- torchaudio.functional.flanger(waveform: Tensor, sample_rate: int, delay: float = 0.0, depth: float = 2.0, regen: float = 0.0, width: float = 71.0, speed: float = 0.5, phase: float = 25.0, modulation: str = 'sinusoidal', interpolation: str = 'linear') Tensor[原始碼]¶
對音訊應用鑲邊效果 (flanger effect)。類似於 SoX 實現。
- 引數:
waveform (Tensor) – 音訊波形,維度為 (…, channel, time)。最多允許 4 個通道
sample_rate ([*int*](https://docs.python.club.tw/3/library/functions.html#int "(in Python v3.13)")) – 波形的取樣率,例如 44100 (Hz)
delay ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 期望的延遲,單位毫秒(ms)。允許的值範圍是 0 到 30
depth ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 期望的延遲深度,單位毫秒(ms)。允許的值範圍是 0 到 10
regen ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 期望的再生(反饋增益),單位 dB。允許的值範圍是 -95 到 95
width ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 期望的寬度(延遲增益),單位 dB。允許的值範圍是 0 到 100
speed ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 調製速度,單位 Hz。允許的值範圍是 0.1 到 10
phase ([*float*](https://docs.python.club.tw/3/library/functions.html#float "(in Python v3.13)")*, 可選*) – 多通道的相位偏移百分比。允許的值範圍是 0 到 100
modulation ([*str*](https://docs.python.club.tw/3/library/stdtypes.html#str "(in Python v3.13)")*, 可選*) – 使用“sinusoidal”(正弦波)或“triangular”(三角波)調製。(預設值:
sinusoidal)interpolation ([*str*](https://docs.python.club.tw/3/library/stdtypes.html#str "(in Python v3.13)")*, 可選*) – 延遲線插值使用“linear”(線性)或“quadratic”(二次)方法。(預設值:
linear)
- 返回:
波形,維度為 (…, channel, time)
- 返回型別:
Tensor
- 參考
Scott Lehman, Effects Explained,