Matching two series of Mfcc coefficients

时光毁灭记忆、已成空白 提交于 2020-01-01 19:04:18

问题


I have extracted two series MFCC coefficients from two around 30 second audio files consisting of the same speech content. The audio files are recorded at the same location from different sources. An estimation should be made whether the audio contains the same conversation or a different conversation. Currently I have tested a correlation calculation of the two Mfcc series but the result is not very reasonable. Are there best practices for this scenario?


回答1:


I had the same problem and the solution for it was to match the two arrays of MFCCs using the Dynamic Time Warping algorithm.

After computing the MFCCs you should now have, for each of your two signals, an array where each element contains the MFCCs for a frame (an array of arrays). The first step would be to compute "distances" between every one element of one array and every one element of the other, i.e. distances between every two sets of MFCCs (you could try using the Euclidian Distance for this).

This should leave you with a 2-dimensional array (let's call it "dist") where element (i,j) represents the distance between the MFCCs of the i-th frame in the first signal and the MFCCs of the j-th frame of your second signal.

On this array you can now apply the DTW algorithm:

  • dtw(1,1) = dist(1,1)
  • dtw(i,j) = min (dtw(i-1, j-1), dtw(i-1, j), dtw(i, j-1)) + dist(i,j).

The value representing the "difference" between your two files is dtw(n,m), where n = nr. of frames in the first signal, m = nr. of frames of the second one.

For further reading, this paper might give you an overall view of applying DTW to MFCCs and this presentation of the DTW algorithm might also help.




回答2:


Since the two vectors are effectively histograms, you might want to try calculating the chi-squared distance between the vectors (a common distance measure for histograms).

d(i) = sum (x(i) - y(i))^2/(2 * (x(i)+y(i)));

A good (mex) implementation can be found in this toolbox:

http://www.mathworks.com/matlabcentral/fileexchange/15935-computing-pairwise-distances-and-metrics

Call as follows:

d = slmetric_pw(X, Y, 'chisq');



回答3:


I faced the same problem recently. The best way I found is to use the audio library MIRtoolbox, which is very powerful in terms of audio processing.

After adding this library, the distance of two MFCCs can be easily computed by calling (lower distance <=> similar matches):

dist = mirgetdata(mirdist(mfcc1, mfcc2));


来源:https://stackoverflow.com/questions/6932096/matching-two-series-of-mfcc-coefficients

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!