DSPRelated.com
Forums

DTMF decoder for PC

Started by john February 16, 2005
Hi, can anyone recommend a C or C++ package for PC decoding DTMF digits
from a wave file or soundcard?

Thanks,

John

Hi John

> Hi, can anyone recommend a C or C++ package for PC decoding DTMF digits > from a wave file or soundcard?
I'd not call it a package, but I wrote a program, with source code, to do exactly this at http://www.g6lvb.com/Articles/SSETI%20Express%20DTMF%20Telemetry It should not be too tough to rip out the bits of interest. You will not require any of the telemetry decoding parts of course. This is not necessarily the best DTMF decode implementation, but it's the most accurate I've seen for a PC (even though I say so myself). My program uses FFTs and therefore uses the frequency domain characteristics to decode. An alternative, the time domain Goertzel filter based system, is often regarded as a better method. As it stands there are possibilities to improve the FFT algorithm, such as using overlap methods and using the energy of an adjacent bin where DTMF frequencies spread nextdoor, improving sensitivity. Regards, Howard
john wrote:

>Hi, can anyone recommend a C or C++ package for PC decoding DTMF digits >from a wave file or soundcard? > >Thanks, > >John > >
If you grab my spandsp library from ftp.spandsp.org, it pretty much gives you what you need. Its in C. Rip everything out of the DTMF test suite, except the last bit where it reads through the Bellcore test tape files. Change that bit a little, so it reads through the file names you want, and you basically have what you are looking for. It will expect the wave files to be 16bit 8000 sample/second mono files. If your files are not, you will need to run them through a converter, like sox, to get them into that form. The DTMF detector passes all the standard tests, as you will find if you run the test suite. Regards, Steve