Afficher commentaires plus anciens
i have the following code for speech recognition using lpc parameters but its not working correctly:
b = wavrecord(Nseconds*Fs, Fs, 'double');
P = n1; % Prediction order
P1 = P+1;
q = length(b);
% Length of the input speech
N = 250;
% Length of each segment is 250
betold = zeros(1,P1); % Set to zero the initial reverse prediction errors
for seg = 1:q/N, % Loop whole speech
s = b((seg-1)*N+1:seg*N); % s is for one particular segment
r = zeros(1,P1); % Set to zero the initial autocorrelation
for m = 1:P1, % Loop to compute autocorrelation
for n = 1:N-m+1,
r(m) = r(m) + s(n)*s(n+m-1);
end
end % End of the autocorrelation loop
a(1) = 0; % Beginning of Durbin's recursive method
error = r(1);
for p = 1:P,
aold = a;
q = r(p+1);
for m=1:p-1,
q = q - a(m)*r(p-m+1);
end
if(error==0)
error=1;
end
K(p) = q/error; % Reflection coefficients
error = error*(1.- K(p)*K(p));
a(p) = K(p);
for m=1:p-1,
a(m) = aold(m) - K(p)*aold(p-m);
end
end
f=q;
fw(i,:) = f;
display(fw);
3 commentaires
Walter Roberson
le 31 Mar 2011
Please edit your question, select your code and click on the 'Code {}' button. That will reformat your code so that it appears like a program to the readers.
Walter Roberson
le 31 Mar 2011
I think you should expand on what you mean by "its not working correctly".
Prince Ankit Singh
le 20 Fév 2012
LPC is a technique for compression of data in speech processing. Then hw can we implement it as a speech recognition technique?
Réponses (1)
devika asokan
le 1 Avr 2011
1 commentaire
Walter Roberson
le 1 Avr 2011
What would happen if the first sample or the last sample in the first segment were zero? What would the error become?
Catégories
En savoir plus sur Speech Recognition dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!