mel_frequencies

paddle.audio.functional. mel_frequencies ( n_mels: int = 64, f_min: float = 0.0, f_max: float = 11025.0, htk: bool = False, dtype: str = 'float32' ) Union[paddle.Tensor, paddle.base.framework.Variable, paddle.base.libpaddle.pir.Value] [source]

Compute mel frequencies.

Parameters
  • n_mels (int, optional) – Number of mel bins. Defaults to 64.

  • f_min (float, optional) – Minimum frequency in Hz. Defaults to 0.0.

  • fmax (float, optional) – Maximum frequency in Hz. Defaults to 11025.0.

  • htk (bool, optional) – Use htk scaling. Defaults to False.

  • dtype (str, optional) – The data type of the return frequencies. Defaults to ‘float32’.

Returns

Tensor of n_mels frequencies in Hz with shape (n_mels,).

Return type

Tensor

Examples

>>> import paddle

>>> n_mels = 64
>>> f_min = 0.5
>>> f_max = 10000
>>> htk_flag = True

>>> paddle_mel_freq = paddle.audio.functional.mel_frequencies(
...     n_mels, f_min, f_max, htk_flag, 'float64')