how can i get the complete formant frequencies rather than the average (F1, F2..). I have to plot formants graph for F1, F2, F3 ..

3 views (last 30 days)
[y,fs]=audioread('signal_path');
t=linspace(0,length(y)/fs,length(y));
subplot(311);
plot(t,y);
segmentlen=100;
noverlap=90;
NFFT=128;
subplot(312)
spectrogram(y,segmentlen,noverlap,NFFT,fs,'yaxis')
title('Signal Spectrogram')
dt=1/fs;
I0 = round(0.001/dt);
Iend = round(0.06/dt);
x = y(I0:Iend);
x1 = x.*hamming(length(x));
preemph = [1 0.63];
x1 = filter(1,preemph,x1);
A = lpc(x1,16);
rts = roots(A);
rts = rts(imag(rts)>=0);
angz = atan2(imag(rts),real(rts));
[frqs,indices] = sort(angz.*(fs/(2*pi)));
bw = -1/2*(fs/(2*pi))*log(abs(rts(indices)));
nn = 1;
for kk = 1:length(frqs)
if (frqs(kk) > 90 && bw(kk) <400)
formants(nn) = frqs(kk);
nn = nn+1;
end
end
formants
  3 Comments
eha kv
eha kv on 10 Sep 2021
we got a point from reading "formant frequencies should be greater than 90 Hz with bandwidths less than 400 Hz" is it correct.
the result of our program where the input is a voice siganal (.wav)
formants =
1.0e+03 *
0.8103 1.2005 1.2487 3.5203 4.1011 5.4858 6.1823 7.0883
these are average values of formant (F1,F2....)
please help me to find all frequencies of F1 and F2....

Sign in to comment.

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!