How do you find average power?
153 visualizaciones (últimos 30 días)
Nathan Jaqua el 20 de Nov. de 2019
Hi y'all, I'm having an issue with this logic. I need to find the average power of but I don't see what I am doing wrong with this. Nothing shows up when I read my start.au and thusly, I'm not sure about my voiced and un_voiced segments.
[x, Fs] = audioread('start.au');
% plot the file
plot(x, Fs);grid on;
title('raw speech data');
% identify voiced segment from the speech vector. Load it in newly created
% voiced segment array
L = 300; % number of samples in sub-sample array
x_voiced = x(L:0+ L-1);
% identify unvoiced segment from the speech vector. Load it in newly created
% unvoiced segment array
x_unvoiced = x(L:0 + L-1);
% calculate average power of a voiced and unvoiced segments.
% Use avg power formula as shown in the file
P_voiced = sum(x_voiced)/L;
P_unvoiced = sum(x_unvoiced)/L;