create_dct

paddle.audio.functional. create_dct ( n_mfcc: int, n_mels: int, norm: Optional[str] = 'ortho', dtype: str = 'float32' ) paddle.Tensor [source]

Create a discrete cosine transform(DCT) matrix.

Parameters
  • n_mfcc (int) – Number of mel frequency cepstral coefficients.

  • n_mels (int) – Number of mel filterbanks.

  • norm (Optional[str], optional) – Normalization type. Defaults to ‘ortho’.

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

Returns

The DCT matrix with shape (n_mels, n_mfcc).

Return type

Tensor

Examples

>>> import paddle
>>> n_mfcc = 23
>>> n_mels = 257
>>> dct = paddle.audio.functional.create_dct(n_mfcc, n_mels)