How to get frequency using auto-correlation ?

1 次查看(过去 30 天)
Hello, I need to get fundamental frequency using auto-correlation function. I have 3 5 second speech recordings. It has been told to me that I should use hamming window. I need to split a recording into smaller parts and then use autocorrelation for every single part. At the end I have to show that frequency on a graph. I would be thankful for any help.
clear all;
[y, fs] = audioread('kid.wav');
frame_duration= 0.1;
frame_len = frame_duration*fs;
fs= 44100;
f_size= fs*frame_duration;
n_f=round(length(y)/f_size);
temp=0;
w= hamming(512);
for i=1 : n_f
frame(i,:)= (y(temp +1 : temp + f_size));
temp= temp+f_size;
end
  1 个评论
Brian Hemmat
Brian Hemmat 2019-12-31
Take a look at the pitch function in Audio Toolbox. The default algorithm, normalized corrrelation function, does basically what you're describing.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by