Skip to main content
Added answers to questions.
Source Link
Peter K.
  • 26k
  • 9
  • 47
  • 93

Dynamic Time Warping is pretty well explained on this site. I'll use some of the diagrams from the PPT on that site to explain.

The idea is to divide the signals into segments (frames) and then compare frames sequentially through each signal. As illustrated below, motion from a segment in one signal to the next segment depends on the similarity to the current segment in the other signal.

enter image description here

For your example of audio files, you usually have features that you extract from them (LPCs or MFCCs for example). Extract these from each frame. Use these features as the comparison features used in the DTW algorithm.


  1. Suppose I have 10-10 frames of my 2 signals and each frame has 13 MFCC coefficients so the 2 DTW signals will be all coefficients arranged sequentially?

Well, before DTW you'll have $MFCC_s^f$ for signal $s$ for each frame, $f$:

Signal 1: $MFCC_1^1$,$MFCC_1^2$, $\ldots MFCC_1^{N_1}$

Signal 2: $MFCC_2^1,MFCC_2^2, \ldots MFCC_2^{N_2} $

where $N_1 \not=N_2$ and $N_s$ is the number of frames for each signal, $s = 1,2$.

After DTW, you'll have the best matching path over $N_\mbox{min} = \min(N_1,N_2)$ frames:

Signal 1: $MFCC_1^1$,$MFCC_1^1$, $\ldots MFCC_1^{N_?}$

Signal 2: $MFCC_2^1,MFCC_2^2, \ldots MFCC_2^{N_?} $

Then the comparison will be done by running all $those$ MFCCs sequentially.

  1. How this shortest path can be used to decrease or increase the size of one signal so that they are of same size?

See above explanation: After DTW you'll only have the same number of MFCCs for each and every signal. All other (unused) frames with MFCCs are discarded for comparison purposes.

Dynamic Time Warping is pretty well explained on this site. I'll use some of the diagrams from the PPT on that site to explain.

The idea is to divide the signals into segments (frames) and then compare frames sequentially through each signal. As illustrated below, motion from a segment in one signal to the next segment depends on the similarity to the current segment in the other signal.

enter image description here

For your example of audio files, you usually have features that you extract from them (LPCs or MFCCs for example). Extract these from each frame. Use these features as the comparison features used in the DTW algorithm.

Dynamic Time Warping is pretty well explained on this site. I'll use some of the diagrams from the PPT on that site to explain.

The idea is to divide the signals into segments (frames) and then compare frames sequentially through each signal. As illustrated below, motion from a segment in one signal to the next segment depends on the similarity to the current segment in the other signal.

enter image description here

For your example of audio files, you usually have features that you extract from them (LPCs or MFCCs for example). Extract these from each frame. Use these features as the comparison features used in the DTW algorithm.


  1. Suppose I have 10-10 frames of my 2 signals and each frame has 13 MFCC coefficients so the 2 DTW signals will be all coefficients arranged sequentially?

Well, before DTW you'll have $MFCC_s^f$ for signal $s$ for each frame, $f$:

Signal 1: $MFCC_1^1$,$MFCC_1^2$, $\ldots MFCC_1^{N_1}$

Signal 2: $MFCC_2^1,MFCC_2^2, \ldots MFCC_2^{N_2} $

where $N_1 \not=N_2$ and $N_s$ is the number of frames for each signal, $s = 1,2$.

After DTW, you'll have the best matching path over $N_\mbox{min} = \min(N_1,N_2)$ frames:

Signal 1: $MFCC_1^1$,$MFCC_1^1$, $\ldots MFCC_1^{N_?}$

Signal 2: $MFCC_2^1,MFCC_2^2, \ldots MFCC_2^{N_?} $

Then the comparison will be done by running all $those$ MFCCs sequentially.

  1. How this shortest path can be used to decrease or increase the size of one signal so that they are of same size?

See above explanation: After DTW you'll only have the same number of MFCCs for each and every signal. All other (unused) frames with MFCCs are discarded for comparison purposes.

Source Link
Peter K.
  • 26k
  • 9
  • 47
  • 93

Dynamic Time Warping is pretty well explained on this site. I'll use some of the diagrams from the PPT on that site to explain.

The idea is to divide the signals into segments (frames) and then compare frames sequentially through each signal. As illustrated below, motion from a segment in one signal to the next segment depends on the similarity to the current segment in the other signal.

enter image description here

For your example of audio files, you usually have features that you extract from them (LPCs or MFCCs for example). Extract these from each frame. Use these features as the comparison features used in the DTW algorithm.