Main Content


Get auditory filter bank

The cepstralFeatureExtractor System object™ and getFilters object function will be removed in a future release.



[filterbank,freq] = getFilters(cepFeatures) returns the filter bank and the corresponding frequency bins in Hz. Each column of the filter bank corresponds to a single bandpass filter. The filter bank is undefined until the object is locked.


collapse all

The auditory filter bank contains a set of bandpass filters. The getFilters function returns the auditory filter bank and the corresponding frequency bins.

Read an audio signal from 'SpeechDFT-16-8-mono-5secs.wav' file. Extract a 40 ms segment from the audio data. Create a cepstralFeatureExtractor System object™ that accepts a time-domain audio input signal sampled at 8 kHz.

[audioFile, fs] = audioread('SpeechDFT-16-8-mono-5secs.wav');
duration = round(0.04*fs); % 40 ms
audioSegment = audioFile(5500:5500+duration-1);
cepFeatures = cepstralFeatureExtractor('SampleRate',fs)
cepFeatures = 
  cepstralFeatureExtractor with properties:

       FilterBank: 'Mel'
      InputDomain: 'Time'
        NumCoeffs: 13
    Rectification: 'Log'
        FFTLength: []
        LogEnergy: 'Append'
       SampleRate: 8000

  Show all properties

Pass the 40 ms audio segment as an input to the cepstralFeatureExtractor algorithm. The algorithm computes the mel frequency coefficients, log energy, delta, and delta-delta values of the audio segment.

[coeffs,delta,deltaDelta] = cepFeatures(audioSegment); 

Input Arguments

collapse all

Input cepstral feature extractor, specified as a cepstralFeatureExtractor System object. To use the getFilters function, the object must be locked. The filter bank is defined only when the object is locked. The object is locked when you call the object algorithm.

Output Arguments

collapse all

Filter bank used to calculate cepstral features, returned as a matrix. Each column of the matrix corresponds to a single bandpass filter in the filter bank. The number of columns in the matrix is given by m – 2, where m is the length of the vector you specify in the BandEdges property of the System object. The number of rows in the matrix corresponds to the FFT length. By default, the FFT length equals the number of rows in the input signal. You can also specify the FFT length through the FFTLength property of the System object.

Data Types: single | double

Frequency bins corresponding to the filter bank in Hz, returned as a row vector. The length of the vector equals the FFT length.

Data Types: single | double

Version History

Introduced in R2018a

expand all