how can i use xcorr function to detect pitch of a speech signal

1 view (last 30 days)
I'm facing some difficulty to detect the pitch of the signal
[y fa]=wavread('watch.wav');
Fs=1000;
t=(0:(Fs-1))*(1/Fs);
plot(y);
z=fft(y);
R = xcorr(y);
[pks,locs]=findpeaks(R);
max(Fs./diff(locs))
but by increasing Fs max the value is 5(multiples of 10) but i think it is not pitch help me wid perfect solution

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!