www.pudn.com > LPCToolbox.rar > LPCTOOL.M


%  lpctool(filelist [,index]) 
% 
%  LPCTOOL is a tool for formant analysis of speech sounds using 
%  Linear Predictive Coding. For each sound, it allows the user to  
%  specify the filter order, and computes the formant locations for 
%  each frame using 512-point FFT of the LPC spectrum and peak- 
%  picking using three-point parabolic interpolation. The resulting 
%  formant estimates are written to a file (e.g. if the sound file is  
%  SND1.WAV, the estimates are written to SND1.DAT).  
% 
%   filelist: A list of filenames (can be a array of strings, or a cell 
%     array). If a single filename is given and it has an extension of 
%     .DAT or .TXT, it is taken to be a file containing the list of  
%     sound filenames (one on each line). Currently, .WAV, .AU,  
%     and .RAW files are supported.  
% 
%   index : the index at which to start processing the list of  
%     filenames.  Default = 1.%              
% 
% References: 
% 
%  Markel & Gray (1976). Linear Prediction of Speech, Springer-Verlag. 
%  Vallabha & Tuller, Systematic Errors in Formant Estimation. 
%  Vallabha & Tuller, Choice of Filter Order in LPC Analysis of Speech. 
% 
% Gautam Vallabha (vallabha@walt.ccs.fau.edu), NOV-15-2000 
% Center for Complex Systems, Florida Atlantic University. 
% 
 
function lpctool(filelst, idx) 
global Cs  Filelist Ap 
global Handle 
 
if nargin < 2, idx = 1; end 
 
Filelist = loadfilelist(filelst); 
if length(Filelist)==0,  
  fprintf(1, 'No sound files!\n'); 
  return; 
end 
 
setparams;  % setup Ap & initialize Cs 
uiconfig('set'); 
 
[err,msg] = loadsound(idx); 
if err==0, 
  rcfig_draw; 
else 
  errordlg(msg, 'Error'); 
end 
 
rcfig_draw;  
 
% control is released to rcfig and pksfig