Currently I'm working on speech recognition project in MATLAB. I've taken two voice signals and have extracted the MFCC coefficients of the same. As far as I know, I should now calculate the Euclidean distance between the two and then apply the DTW algorithm. That's why I calculated the distnace between the two and got an array of the distances. So my question is how to implement DTW on resultant array?
Here's my MATLAB code:
clear all; close all; clc;
% Define variables
Tw = 25; % analysis frame duration (ms)
Ts = 10; % analysis frame shift (ms)
alpha = 0.97; % preemphasis coefficient
M = 20; % number of filterbank channels
C = 12; % number of cepstral coefficients
L = 22; % cepstral sine lifter parameter
LF = 300; % lower frequency limit (Hz)
HF = 3700; % upper frequency limit (Hz)
wav_file = 'Play.wav'; % input audio filename
wav_file1 = 'Next.wav';
% Read speech samples, sampling rate and precision from file
[ speech, fs, nbits ] = wavread( wav_file );
[ speech1, fs, nbits ] = wavread( wav_file1 );
% Feature extraction (feature vectors as columns)
[ MFCCs, FBEs, frames ] = ...
mfcc( speech, fs, Tw, Ts, alpha, @hamming, [LF HF], M, C+1, L );
[ MFCC1s, FBEs, frames ] = ...
mfcc( speech1, fs, Tw, Ts, alpha, @hamming, [LF HF], M, C+1, L );
L = pdist2(MFCCs, MFCC1s, 'euclidean');