speech production

2 views (last 30 days)
Farideh Jalali
Farideh Jalali on 26 Jun 2012
I am trying to generate the /a/ vowel by using speech production model (digital filters)by following codes.
I am not able to hear the /a/.
function dfcoeff;
imp=[1 zeros(1,33075)]; %create impulse response
[b,a]=gp(0.88); % generate glottal pulse filter coefficients
gp88=filter(b,a,imp); % create a single glottal pulse period, 120 long
Ff=5512.5; % folding frequency is 5000 Hz
a1=0.98; % radius for pole 1
p1=710; % angle for pole 1
a2=0.96; % radius for pole 2
p2=1100.0; % angle for pole 2
a3=0.85; % radius for pole 3
p3=2450.0; % angle for pole 3
a4=0.85; %radius for pole 4
p4=3600.0; % angle for pole 4
sf=10; % scale factor for z-plane
[b,a]=allpoles(Ff,p1,a1,p2,a2,p3,a3,p4,a4,sf);% all-pole filter
%freqz(a,b) %view frequency response
y=filter(b,a,gp88);% filter response
x=conv(y,[1 -1]);% model of sound passing lips
soundsc(x,11025);
function [b,a]= gp(ap)
% returns digital filter coefficients using parameter ap.
e=2.71828;
b=[0 -ap*e*log(ap)];
a=[1 -2*ap ap^2];
function [b,a]=allpoles(Ff,p1,a1,p2,a2,p3,a3,p4,a4,sf)
% Ff = folding frequency
% p# = radius of pole pair # from origin
% a# = frequency location of pole pair #
% sf = pole-zero plot scale factor
% b = vector of input coefficients
% a = vector of output coefficients
% [b,a] = allpoles(p1,a1,p2,a2,p3,a3,p4,a4)
p1a=p1*(cos(a1*pi/Ff)+sin(a1*pi/Ff)*j);
p1b=conj(p1a);
p2a=p2*(cos(a2*pi/Ff)+sin(a2*pi/Ff)*j);
p2b=conj(p2a);
p3a=p3*(cos(a3*pi/Ff)+sin(a3*pi/Ff)*j);
p3b=conj(p3a);
p4a=p4*(cos(a4*pi/Ff)+sin(a4*pi/Ff)*j);
p4b=conj(p4a);
[b,a]=zp2tf([],[p1a;p1b;p2a;p2b;p3a;p3b;p4a;p4b],sf);
Any suggestion?

Answers (0)

Categories

Find more on Signal Processing Toolbox 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!