mindspore.dataset.audio.create_dct

mindspore.dataset.audio.create_dct(n_mfcc, n_mels, norm=NormMode.NONE)[源代码]

Create a DCT transformation matrix with shape (n_mels, n_mfcc), normalized depending on norm.

Parameters
  • n_mfcc (int) – Number of mfc coefficients to retain, the value must be greater than 0.

  • n_mels (int) – Number of mel filterbanks, the value must be greater than 0.

  • norm (NormMode) – Normalization mode, can be NormMode.NONE or NormMode.ORTHO (default=NormMode.NONE).

Returns

numpy.ndarray, the transformation matrix, to be right-multiplied to row-wise data of size (n_mels, n_mfcc).

Examples

>>> from mindspore.dataset.audio import create_dct, NormMode
>>>
>>> dct = create_dct(100, 200, NormMode.NONE)