在您开始阅读之前,请原谅我的英语不好,谢谢。
我正在利比亚学习计算机工程课程的最后一年。
我的毕业项目名称是“使用分类器融合方法的孤立词的语音识别系统”。该项目的基本思想是,我输入一个数字(0-9)的 1 秒录音,它以文本的形式显示在屏幕上。我的步骤是:
* Input the word .
* Pre-processing of the speech signal.
* Extract features using Mel Frequency Cepstral Coefficients.
* classify the word using:
* MED Classifier.
* Dynamic Time Warping Classifier .
* Bayes Classifier .
* Classifier Fusion: Combination of the above classifiers, hoping to compensate for weak
classier performance.
因此,在我使用 MFCC 并提取了我的特征之后,我使用 MED 只是为了查看整个 ASR 系统,并直观地了解它应该如何工作。然后我从 DTW 分类器开始,老实说,我不确定我做得对,所以这里是代码,如果有人以前使用过 DTW 作为分类器,请告诉我使用 DTW 是个好主意,如果所以,我做对了吗???
test.mat 里面有两个变量 'm' 是第一名的口语,'b' 也是第一名的口语,但是每个都是单独记录的,然后我会保留'm',并比较它对录字二来说,1vs1的成本一定比1vs2小,但我的情况不是,这是为什么呢????
clear;
load('test.mat')
b=m;
m=b;
dis=zeros(length(m),length(b));
ac_cost=zeros(length(m),length(b));
cost=0;
p=[];
%we create the distance matrix by calculating the Eucliden distance between
%all pairs
for i = 1 : length(m)
for j = 1 : length(b)
dis(i,j)=(b(j)-m(i))^2;
end
end
ac_cost(1,1)=dis(1,1);
%calculate first row
for i = 2 : length(b)
ac_cost(1,i)=dis(1,i)+ac_cost(1,i-1);
end
%calculate first coulmn
for i = 2 : length(m)
ac_cost(i,1)=dis(i,1)+ac_cost(i-1,1);
end
%calculate the rest of the matrix
for i = 2 : length(m)
for j = 2 : length(b)
ac_cost(i,j)=min([ac_cost(i-1,j-1),ac_cost(i-1,j),ac_cost(i,j-1)])+dis(i,j);
end
end
%find the best path
i=length(m)
j=length(b)
cost=cost+dis(i,j)+dis(1,1)
while i>1 && j>1
cost=cost+min([dis(i-1, j-1), dis(i-1, j), dis(i, j-1)]);
if i==1
j=j-1;
elseif j==1
i=i-1;
else
if ac_cost(i-1,j)==min([ac_cost(i-1, j-1), ac_cost(i-1, j), ac_cost(i, j-1)])
i=i-1;
elseif ac_cost(i,j-1)==min([ac_cost(i-1, j-1), ac_cost(i-1, j), ac_cost(i, j-1)])
j=j-1;
else
i=i-1;
j=j-1;
end
end
end
谢谢大家