Home > @d_opvt > synthX.m

synthX

PURPOSE ^

SYNTH1 Synthesizes the output from the vocal tract

SYNOPSIS ^

function [data] = synthX(vtm,X,params)

DESCRIPTION ^

 SYNTH1    Synthesizes the output from the vocal tract
       1. Y = synth1(vtm,data);
           In this case the input data contains the following
           subfields: Ag0, AgP, F0, Af, dx, fs, duration

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data] = synthX(vtm,X,params)
0002 % SYNTH1    Synthesizes the output from the vocal tract
0003 %       1. Y = synth1(vtm,data);
0004 %           In this case the input data contains the following
0005 %           subfields: Ag0, AgP, F0, Af, dx, fs, duration
0006 
0007 % Satrajit Ghosh, SpeechLab, Boston University. (c)2001
0008 % $Header: /mnt/localhd/cvsdir/MODELLING/NEWDIVA/@d_opvt/synthX.m,v 1.1.1.1 2006/10/06 18:20:23 brumberg Exp $
0009 
0010 % $NoKeywords: $
0011 
0012 % Setup globals
0013 global RELEASE
0014 
0015 X=cat(2,X(:,1),X);
0016 [N,Nt]=size(X);
0017 if N~=10, 
0018   error('wrong dimensionality'); 
0019 end
0020 
0021 data.fs = params.vtcalc_fs; 
0022 data.duration = params.TimeStep*Nt*1000;
0023 data.X = X(1:7,:);
0024 data.P = X(9,:);
0025 time = 1000*params.TimeStep*(0:Nt-1)';
0026 interp = 1*ones(Nt,1);
0027 data.Ag0 = [time,X(8,:)',interp]; 
0028 data.Ag0(1,3)=0;
0029 data.AgP = [time,X(9,:)',interp]; 
0030 data.AgP(1,3)=0;
0031 data.F0 = [time,X(10,:)',interp]; 
0032 data.F0(1,3)=0;
0033 data = diva_synthX(data);
0034 
0035 if params.vtcalc_fs~=params.fs, data.sig=resample(data.sig,params.fs,params.vtcalc_fs); end
0036 data.sig=data.sig+.0001*randn(size(data.sig));
0037

Generated on Tue 27-Mar-2007 12:06:24 by m2html © 2003