Shortcuts

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[source]

Detect pitch frequency.

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

It is implemented using normalized cross-correlation function and median smoothing.

Parameters:
  • waveform (Tensor) – Tensor of audio of dimension (…, freq, time)

  • sample_rate (int) – The sample rate of the waveform (Hz)

  • frame_time (float, optional) – Duration of a frame (Default: 10 ** (-2)).

  • win_length (int, optional) – The window length for median smoothing (in number of frames) (Default: 30).

  • freq_low (int, optional) – Lowest frequency that can be detected (Hz) (Default: 85).

  • freq_high (int, optional) – Highest frequency that can be detected (Hz) (Default: 3400).

Returns:

Tensor of freq of dimension (…, frame)

Return type:

Tensor

Tutorials using detect_pitch_frequency:
Audio Feature Extractions

Audio Feature Extractions

Audio Feature Extractions

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources