% read waveform files
[x, fs, nbits] = wavread('test_16k.wav');

% wideband spectrogram
L = 0.006*fs; % 6 ms
R = 10;
N = 512;
w = hamming(L);
subplot(2,1,1);
spectrogram(x,w,L-R,N,fs,'yaxis');
title('wideband spectrogram');

% narrowband spectrogram
L = 0.06*fs; % 60 ms
R = 96;
N = 1024;
w = hamming(L);
subplot(2,1,2);
spectrogram(x,w,L-R,N,fs,'yaxis');
title('narrowband spectrogram');
