Simple if else for buffer speech

4 views (last 30 days)
Hamzah amee
Hamzah amee on 5 Nov 2014
Hi, how can I display the required answer 'yes' or 'no' for each ZCR calculated on each buffer frame speech?
here is the coding. It only display 1 answer. I suppose to get 23 answers. Please help me.thanks a lot.
X=wavread('speech01_denoised.wav');
N=400;
Y = buffer(X,N);
s=sum(abs(diff(Y>0)))/length(Y);%ZCR
if s<=0
display('yes')
elseif (s>=0)
display('no')
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!