10 years, 5 months ago.

DSP code on LPC1768

I am trying to implement a DSP code (Dynamic Time Warping algorithm) on the LPC1768, but it is very slow. Is it possible to use threading or some similar concept to speed it up? Or should I use an external DSP processor? I am using this for speech recognition

3 Answers

10 years, 4 months ago.

Jim Hamblen's EasyVR notebook page may be of interest to you, he has a code example and a video of it working. This module was also used in ERIC the robodog that was featured on the blog recently, though Martin mentions that he had trouble getting it to recognise his accent.

Threading is certainly possible, have a look at the RTOS page on the handbook for an overview of how to use mbed-rtos.

10 years, 4 months ago.

I suggest using the CMSIS-DSP library to implement your DTW algorithm with optimized primitives, in this case fixed point implementations tuned for the M3 core. This is a reference I would start with as it has references to the implementation technique kusu.comp.nus.edu.sg/proceedings/mm03/docs/p452.pdf.

10 years, 4 months ago.

Without being hindered by too much experience with these things: I would first look at how much of the time the mbed is currently busy running calculations. If it is running calculations 90%+ of the time you can add as much RTOS stuff as you want, it wont become faster. If it is idle much of the time RTOS could help, but I don't see why it would be a requirement for a more efficient usage of the hardware.

In the end you got a good chance the LPC simply lacks processing power for your current algorithm, but that should be clear after checking how much time it is idle now. Then you can either have a look at making the algorithm lighter, or you need to run it on an external DSP (/buy a specific speech recognition module). For sure it would be very interesting if you could get speech recognition working on an mbed, I am guessing many would be interested in that.