% pomocny soubor na parametrizaci pro VQ. 

ff = fopen ('speech.raw','r'); 
speech = fread (ff, [1 inf], 'short') / 32768.0; 
fclose (ff); 

SFR = frame (speech, 240, 160); 
[dummy,Nfr] = size(SFR); 
Aspeech = zeros(10,Nfr); 
for ii=1:Nfr, 
  x = SFR(:,ii); 
  a=lpc(x,10); 
  Aspeech(:,ii) = a(2:11)'; 
end

ff = fopen ('test.l16','r'); 
test = fread (ff, [1 inf], 'short') / 32768.0; 
fclose (ff); 

SFR = frame (test, 240, 160); 
[dummy,Nfr] = size(SFR); 
Atest = zeros(10,Nfr); 
for ii=1:Nfr, 
  x = SFR(:,ii); 
  a=lpc(x,10); 
  Atest(:,ii) = a(2:11)'; 
end



