Extract cepstral coefficients from spectrogram
Audio Toolbox / Features
The Cepstral Coefficients block extracts the cepstral coefficients from a real-valued spectrogram or auditory spectrogram. Cepstral coefficients are commonly used as compact representations of audio signals.
Port_1 — Spectrogram or auditory spectrogram
matrix | 3-D array
Spectrogram or auditory spectrogram, specified as an L-by-M matrix or L-by-M-by-N array, where:
L is the number of frequency bands.
M is the number of frames.
N is the number of channels.
Port_1 — Cepstral Coefficients
matrix | 3-D array
Cepstral coefficients, returned as an M-by-B matrix or M-by-B-by-N array, where:
M is the number of frames in the input spectrogram.
B is the number of coefficients returned per frame, which is specified by the Number of cepstral coefficients parameter.
N is the number of channels in the input spectrogram.
Number of cepstral coefficients — Number of cepstral coefficients returned
13 (default) | positive integer greater than 1
Number of cepstral coefficients, specified as a positive integer greater than 1.
Rectification — Type of nonlinear rectification
Logarithm (default) |
Cubic root |
Type of nonlinear rectification applied to the spectrum prior to the discrete cosine
transform, specified as
Simulate using — Specify type of simulation to run
Interpreted execution (default) |
Interpreted execution–– Simulate model using the MATLAB® interpreter. This option shortens startup time but has a slower simulation speed than
Code generation. In this mode, you can debug the source code of the block.
Code generation–– Simulate model using generated C code. The first time you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is comparable to
Given an auditory spectrogram, the algorithm to extract N cepstral coefficients from each individual spectrum comprises the following steps.
Rectify the spectrum by applying a logarithm, cubic root, or optionally perform no rectification.
Apply the discrete cosine transform (DCT-II) to the rectified spectrum.
Return the first N coefficients from the cepstral representation.
For more information, see .
 Rabiner, Lawrence R., and Ronald W. Schafer. Theory and Applications of Digital Speech Processing. Upper Saddle River, NJ: Pearson, 2010.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2022b