快捷方式

torchaudio.functional.spectral_centroid

torchaudio.functional.spectral_centroid(waveform: Tensor, sample_rate: int, pad: int, window: Tensor, n_fft: int, hop_length: int, win_length: int) Tensor[原始碼]

計算沿時間軸每個通道的頻譜質心。

This feature supports the following devices: CPU, CUDA This API supports the following properties: Autograd, TorchScript

頻譜質心定義為頻率值的加權平均,權重為其幅度。

引數:
  • waveform (Tensor) – 維度為 (…, time) 的音訊 Tensor

  • sample_rate (int) – 音訊波形的取樣率

  • pad (int) – 訊號的兩側填充

  • window (Tensor) – 應用/乘到每個幀/視窗上的窗 Tensor

  • n_fft (int) – FFT 大小

  • hop_length (int) – STFT 視窗之間的跳躍長度

  • win_length (int) – 視窗大小

返回:

維度 (…, time)

返回型別:

Tensor

文件

查閱 PyTorch 的全面開發者文件

檢視文件

教程

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

檢視教程

資源

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

檢視資源