speech recognition
显示 更早的评论
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
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
2011-3-31
I think you should expand on what you mean by "its not working correctly".
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
2011-4-1
1 个评论
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?
类别
在 帮助中心 和 File Exchange 中查找有关 Speech Recognition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!