% In this file we construct a uniform filterbank using a the impulse
% response of a 4th order gammatone for each channel. The center frequencies
% are equidistantly spaced on an ERB-scale, and the width of the filter are
% choosen to match the auditory filter bandwidth as determined by Moore.
% Each channel is subsampled by a factor of 8 (a=8), and to generate a
% nice plot, 4 channels per Erb has been used.
% The filterbank cover only the positive frequencies, so we must use
% filterbankrealdual and filterbankrealbounds.
% FIGURE 1 Classic spectrogram
% A classic spectrogram of the spoken sentense. The dynamic range has
% been set to 50 dB, to highlight the most important features.
% FIGURE 2 Auditory filterbank reprensentation
% Auditory filterbank representation of the spoken sentense. The
% dynamic range has been set to 50 dB, to highlight the most important
% See also: freqtoaud, audfiltbw, gammatonefir, ufilterbank, filterbankrealdual
% Use the greasylong spoken sentense.
% Determine minimal transform length
% Number of channels, slightly less than 1 ERB(Cambridge) per channel.
% Compute center frequencies.
% In production code, it is not necessary to call 'filterbankrealbounds',
% this is just for veryfying the setup.
disp('Frame bound ratio, should be close to 1 if the filters are choosen correctly.');
% Create reconstruction filters
% Analysis transform
% Synthesis transform
disp('Relative error in reconstruction, should be close to zero.');