This shows a possible implementation of a DTW as a pd external - written in ANSI C. For this demo there are 8 samples that are used as gesture patterns, the algorithm tries to find the best gesture for the sampled input.
Hardware: lo-fi built-in microphone (very bad!)
Software: Puredata 0.41 (works with extended too.)
Jack Audio Server
The code will be released soon, in an open license.