[y,fs,bits] = wavread('SpeechSample.wav'); soundsc(y,fs); % Let's hear it M = round(0.02*fs); % 20 ms typical for speech N = 2^nextpow2(4*M); % zero padding for interpolation w = hamming(M); myspectrogram(y,N,fs,w,-M/8,1,60); % https://ccrma.stanford.edu/~jos/sasp/- % Matlab_Computing_Spectrograms.html title('Speech Sample Spectrogram'); % for classic look: colormap('gray'); map = colormap; imap = flipud(map); colormap(imap);