What i am trying to do is to detect the pitch of a given sound signal, so for that purpose, i wanted to find cepstrum of a given signal.
This is my code in MATLAB:
[x fs] = audioread('a.wav'); N = length(x); n = 0:N-1; figure, stem(n, x); X = fft(x, N); length(X) figure, stem(n, X); Y = X(1:6400); N = length(Y); n = 0:N-1; figure, stem(n, Y); Z = log(abs(Y)); figure, stem(n, Z); z = ifft(Z, N); figure, stem(n, z);
Now, all i did was that i found fft of audio signal and then i cut off the second half of it because it is basically the same thing i have in the first half, then, i just followed the standard procedure for cepstum, i moved to logarimic representation and then i found inverse fourier of it. Based on what i saw on the internet, i expected evenly spaced peaks since that represents existence of a definite pitch in the signal, however, this is what i get:
So basically i have no idea what can i do with this, since this what i have is speech signal, i am not sure why there's no any evenly spaced peaks. When i zoomed in a bit, this is what i got
This also doesn't help at all, i am having trouble with understanding the way that cepstrum enables us to determine pitch frequency so basically, even if i had something what would seem to me as a proper cepstrum, i doubt that i would be able to determine pitch frequency from it, so any help is highly appreciated!