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?
相关问题
- Can we recover audio from MFCC coefficients?
- Extract matrix elements using a vector of column i
- Is there a way to play audio on a mobile browser w
- Cannot use the Knowledge academic API
- How do you get R's null and residual deviance
相关文章
- Android Visualizer class throwing runtime exceptio
- How do I append metadata to an image in Matlab?
- How can I write-protect the Matlab language?
- `std::sin` is wrong in the last bit
- Escape sequence to display apostrophe in MATLAB
- Vertical line fit using polyfit
- Simulate Microphone (virtual mic)
- Android Studio Mediaplayer how to fade in and out
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):
I know the question is here for almost 10 years, but I was searching for the same thing now and I personally found the above suggestions to be too complicated. For others who is still searching you can start with simply using scipy to get distance between two matrices with your mfcc data:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.minkowski_distance.html
To get the detailed MFCC data I was using yaafe (packaged in Docker container): http://yaafe.github.io/Yaafe/manual/install.html
This is how to workaround the installation issue: https://github.com/Yaafe/Yaafe/issues/52
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:
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.
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).
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: