Regarding DTMF decoding through PC

P

Thread Starter

praveena

Is there any possible way that i could decode dtmf tones & dial tone, busy tone using VC++6.0? That is to get the dtmf thru a phone line and be decoded on the pc and the code would then run certain home automation via pc. Are there any books/source codes where i could get some basic idea? Thanks for the help guys.
 
You aren't specific about this, but I assume you intend to have someone use a phone to dial up the computer and have the computer answer the phone and listen for key presses. This is similar to what a computerised voice-mail or answering machine does.

You can get "voice cards" to do this, but I haven't seen any inexpensive ones. All the ones that I have seen however are multi-line cards.

Some dial-up modem cards had this capability. These are rather rare these days though, and I'm not sure what is still on the market at a reasonable price. If you can find some suitable hardware, then you need to read the manuals in detail to see what capability it gives you.

For decoding the signals in software, I think you want to use an FFT (Fast Fourier Transform). An FFT converts the array containing the signal so that each array element represents a frequency instead of a point in time. The amplitude of each array element will then represent the amplitude of that frequency.

If you scan the array (after the FFT is applied) you should be able to find the highest peaks. You would need to apply some additional checking on this to make sure the peaks you found are "correct" and not just some noise.

You would need to take the input stream and apply some real-time digital filtering followed by a threshold to it to find the button presses. When the threshold exceeds a set level, then capture a fixed sample size. Put this sample through an FFT and scan for the peaks that correspond to the two frequencies.

Most people would use GSL (GNU Scientific Library) for things like FFTs. SciPy also packages this (along with other things) if you are using Python. Those options are free.

If as you say you want to use MS's proprietary C++ compiler, then there are a number of third party vendors who sell proprietary equivalents, but be prepared to pay through the nose.
 
Top