提交 959408ba 编写于 作者: K KP

Refactor and add doc string.

上级 504c2c9d
......@@ -261,12 +261,18 @@ class MFCC(nn.Layer):
sr: int=22050,
n_mfcc: int=40,
norm: str='ortho',
dtype: str=paddle.float32,
**kwargs):
"""[summary]
"""Compute mel frequency cepstral coefficients(MFCCs) feature of given waveforms.
Parameters:
sr (int, optional): [description]. Defaults to 22050.
n_mfcc (int, optional): [description]. Defaults to 40.
norm (str, optional): [description]. Defaults to 'ortho'.
sr(int): the audio sample rate.
The default value is 22050.
n_mfcc (int, optional): Number of cepstra in MFCC. Defaults to 40.
norm(str|float): the normalization type in computing fbank matrix. Slaney-style is used by default.
You can specify norm=1.0/2.0 to use customized p-norm normalization.
dtype(str): the datatype of fbank matrix used in the transform. Use float64 to increase numerical
accuracy. Note that the final transform will be conducted in float32 regardless of dtype of fbank matrix.
"""
super(MFCC, self).__init__()
self._log_melspectrogram = LogMelSpectrogram(sr=sr, **kwargs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册