4. Part 2: Implement dynamic time warping (Optional)

In this optional exercise, you have the opportunity to implement dynamic-time warping. You may implement any variation you would like, but we advocate the version championed in the Sakoe and Chiba paper: symmetric DTW with P=1. The distance measure used is Euclidean distance, and the distance calculation will be provided for you.

For this exercise, copy the file Lab1_DTW.H to the same directory as above. Read this file for instructions on what to do; look for the markers BEGIN_LAB and END_LAB.

Your DTW code (as well as front end code) will be compiled into the program DcdDTW, which is a tool that does DTW speech recognition given a set of templates. To compile this program using your code, type
smk DcdDTW
For a description of what this program does, see the next section.

To test your code, you can use the script
lab1p2.sh
This will run the version of DcdDTW in the current directory on a simple digits data set consisting of 11 training templates from a single speaker and 11 test utterances from the same speaker. The -debug flag is supported as before, and the correct output can be found in p2.out in ~stanchen/e6884/lab1/. Note that the correct output will not be useful for those of you who implement alternate versions of DTW.