hz_to_mel¶
- paddle.audio.functional. hz_to_mel ( freq: Union[paddle.Tensor, paddle.base.libpaddle.pir.Value, paddle.base.framework.Variable, float], htk: bool = False ) Union[paddle.Tensor, paddle.base.libpaddle.pir.Value, paddle.base.framework.Variable, float] [source]
-
Convert Hz to Mels.
- Parameters
-
freq (Union[Tensor, float]) – The input tensor with arbitrary shape.
htk (bool, optional) – Use htk scaling. Defaults to False.
- Returns
-
Frequency in mels.
- Return type
-
Union[Tensor, float]
Examples
>>> import paddle >>> val = 3.0 >>> htk_flag = True >>> mel_paddle_tensor = paddle.audio.functional.hz_to_mel( ... paddle.to_tensor(val), htk_flag)