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

Walter Roberson
Walter Roberson 2011년 3월 31일
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
Walter Roberson 2011년 3월 31일
I think you should expand on what you mean by "its not working correctly".
Prince Ankit Singh
Prince Ankit Singh 2012년 2월 20일
LPC is a technique for compression of data in speech processing. Then hw can we implement it as a speech recognition technique?

댓글을 달려면 로그인하십시오.

답변 (1개)

devika asokan
devika asokan 2011년 4월 1일

0 개 추천

showing a divide by 0 warning and coefficients all coming nearly equal.also the spoken word is not being correctly recognized.
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
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);

댓글 수: 1

Walter Roberson
Walter Roberson 2011년 4월 1일
What would happen if the first sample or the last sample in the first segment were zero? What would the error become?

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2011년 3월 31일

편집:

2013년 10월 17일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by