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) – 维度为 (…, 频率, 时间) 的音频张量 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)。 返回: 维度为 (…, 帧) 的频率张量 返回类型: Tensor 使用 detect_pitch_frequency 的教程 音频特征提取 音频特征提取