torchaudio.functional.detect_pitch_frequency¶
- torchaudio.functional.detect_pitch_frequency(waveform: Tensor, sample_rate: int, frame_time: float = 0.01, win_length: int = 30, freq_low: int = 85, freq_high: int = 3400) Tensor [源代码]¶
检测音高频率。
它是使用归一化互相关函数和中值平滑来实现的。
- 参数
waveform (Tensor) – 音频张量,维度为 (…, freq, time)
sample_rate (int) – 波形的采样率 (Hz)
frame_time (float, optional) – 帧的持续时间 (默认:
10 ** (-2)
)。win_length (int, optional) – 用于中值平滑的窗口长度 (以帧数为单位) (默认:
30
)。freq_low (int, optional) – 可以检测到的最低频率 (Hz) (默认:
85
)。freq_high (int, optional) – 可以检测到的最高频率 (Hz) (默认:
3400
)。
- 返回
频率张量,维度为 (…, frame)
- 返回类型
张量
- 使用
detect_pitch_frequency
的教程