动态时间扭曲作为一个分类器,一个好主意?

时间:2016-05-27 15:32:12

标签: signal-processing classification speech-recognition feature-extraction mfcc

在你开始阅读之前请原谅我的英语不好,谢谢。

我是利比亚计算机工程课程的最后一年。

我的毕业设计名称是"语音识别系统用于使用分类器融合方法的隔离词"。 该项目的基本思想是,我输入一个数字(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

提前谢谢大家

0 个答案:

没有答案