Hi Hamzah,
As per my understanding, you would like to display 'yes' or 'no' for wach Zero Crossing Rate (ZCR) calculated on each buffer frame of the speech signal. I suggest you iterate through each frame and calculate the 'ZCR' for each iteration. The number of frames is determined by the second dimension of the buffered matrix 'Y'. A 'for' loop iterates through each frame. This code will display 'yes' or 'no' for each of the 23 frames (or however many frames you have), based on the calculated ZCR for each frame.
Here's an example code snippet that could help you understand this better:
% Read the speech signal
[X, fs] = audioread('speech01_denoised.wav');
% Define the frame length
N = 400;
% Buffer the signal into frames
Y = buffer(X, N);
% Number of frames
numFrames = size(Y, 2);
% Loop through each frame to calculate ZCR and display 'yes' or 'no'
for i = 1:numFrames
frame = Y(:, i);
zcr = sum(abs(diff(frame > 0))) / length(frame); % Calculate ZCR
if zcr <= 0
disp(['Frame ', num2str(i), ': yes']);
else
disp(['Frame ', num2str(i), ': no']);
end
end
Hope that helps!
Balavignesh