MATLAB: Frame by frame freqeuncy analysis of voice.

framesfrequency

below code for frame by frame analysis of wav file , Seniors Go through it and answer my question please , question is written in the last.
[data,fs]= audioread('filename.wav);
fd=0.025 % duration selected from 5 sec
f_size= round(fd*fs);% how many samples in a frame
n_f=floor(length(data)/f_size) %how many frames are there
temp=0; %temporary value
for i= 1: n_f
frames(i,:) =data (temp+1: temp+f_size);
temp=temp+f_size;
end
plot (frame(1,:))%plot first frame or any you want give there numbe .
now.my question is that how can I read frequency of that particular frame or that duration of 0.025 ms? please help me for it .

Best Answer

Have a look at the documentation for the spectrogram function, that should do what you want. 0.025 is a rather short time so perhaps you can get something from calculating the instantaneous frequency - so have a look at that (and first the Hilbert transform too), this is likely a rough suggestion since we expect frequencies way higher than 20 Hz.
HTH