Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Matlab for computing speech spectrogram.

[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);


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[Comment on this page via email]

``Lecture 6: Time-Frequency Display'', by Julius O. Smith III, (From Lecture Overheads, Music 421).
Copyright © 2020-06-27 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]