快捷方式

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]

將移相效果應用於音訊。類似於 SoX 實現。

This feature supports the following devices: CPU, CUDA This API supports the following properties: Autograd, TorchScript
引數:
  • waveform (Tensor) – 維度為 (…, time) 的音訊波形

  • sample_rate (int) – 波形的取樣率,例如 44100 (Hz)

  • gain_in (float, 可選) – 所需的輸入增益(或衰減),單位為 dB。允許值範圍為 0 到 1

  • gain_out (float, 可選) – 所需的輸出增益(或衰減),單位為 dB。允許值範圍為 0 到 1e9

  • delay_ms (float, 可選) – 所需的延遲,單位為毫秒。允許值範圍為 0 到 5.0

  • decay (float, 可選) – 相對於輸入增益的所需衰減。允許值範圍為 0 到 0.99

  • mod_speed (float, 可選) – 調製速度,單位為 Hz。允許值範圍為 0.1 到 2

  • sinusoidal (bool, 可選) – 如果為 True,使用正弦調製(適用於多種樂器)。如果為 False,使用三角調製(為單一樂器提供更尖銳的移相效果)。(預設值: True)

返回:

維度為 (…, time) 的波形

返回型別:

Tensor

參考

© 版權所有 2024, Torchaudio 貢獻者。

使用 Sphinx 構建,主題由 Read the Docs 提供。

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源