Effacer les filtres
Effacer les filtres

Hi , I make spectral analysis for female voice ( wav file for 2 word only ) , I get frequency contents below 1000 Hz , so is this correct , also I suspect computation of power of abs(fft) , please advise , thanks

1 vue (au cours des 30 derniers jours)
file1='Left_2_f.wav';
[y,fs] = audioread(file1);
L=length(y);
t=(1000*(0:1/fs:(L-1)/fs))';
n = 2^nextpow2(L);
Y=fft(y,n);
P = abs(Y/n);
P = P(1:n/2+1);
P(2:end-1) = 2*P(2:end-1);
power = abs(Y).^2/n; % power of the DFT
power = power(1:n/2+1);
power(2:end-1) = 2*power(2:end-1);
f = fs*(0:(n/2))/n;
f1 = fs*(0:n-1)/n;
figure
subplot(4,1,1)
plot(t,y)
xlabel('Time in mseconds');
ylabel('Audio Level');
title('Plot of female voice ');
grid on
grid minor
subplot(4,1,2)
plot(f,P)
title('Single-Sided Magnitude Spectrum of female voice ')
xlabel('f (Hz)')
ylabel('Magnitude')
grid on
grid minor
subplot(4,1,3)
[pk,j] = findpeaks(P,'SortStr','descend','NPeaks',8);
Peaks(:,j) = f(j);
xx=(f(:,j));
xx=(sort(xx));
[~,loc] = max(P);
plot(f(1:10*loc),P(1:10*loc),f(j),pk,'o')
title(['The maixmum of Magnitude Spectrum occurs at ( ' ,num2str(xx) , ' ) Hz' ])
xlabel('f (Hz)')
ylabel('Magnitude')
grid on
grid minor
subplot(4,1,4)
plot(f,power)
xlabel('Frequency')
ylabel('Power')

Réponse acceptée

Image Analyst
Image Analyst le 30 Mar 2019
It's correct - females can have audio power below 1 kHz.
To get power, try pwelch() or bandpower().

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by