Forums

DTMF Detection

Started by kgoodrich August 8, 2007
I am trying to develop an application(in C#) that will be able to decode
DTMF tones coming in through my microphone input.  My main focus right now
is to detect a dialtone.  I am in no way familiar with any of the
algorithms or formulas used for any of this stuff.  I have spent a week
searching and have found people using the Goertzel Algorithm, along with
other methods.  I need to find the most straight-forward way to detect a
dialtone and other DTMF tones via my microphone input.  I currently have
the capability through my code to capture audio from my telephone into a
buffer for processing, but I do not know where to go from there.  Like
what Wav configuration do I need to capture my audio at for processing. 
Currently I have an application that captures audio into a buffer at 44100
samples per sec, 16 bits per sample, 2 channels.  That is the way the class
was designed to capture the audio for processing.  What is the most
straight-forward way to process the audio for tones and dialtones????? 
Please Help.

Thanks,
Kendal



kgoodrich wrote:

> I am trying to develop an application(in C#) that will be able to decode > DTMF tones coming in through my microphone input. My main focus right now > is to detect a dialtone. I am in no way familiar with any of the > algorithms or formulas used for any of this stuff.
[...] If you need a good DTMF/dialtone detector in C#, we can develop it for you. The contact email is at the website below. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Aug 8, 11:20 am, "kgoodrich" <kgoodr...@jeffersonmedical.net>
wrote:
> I am trying to develop an application(in C#) that will be able to decode > DTMF tones coming in through my microphone input. My main focus right now > is to detect a dialtone. I am in no way familiar with any of the > algorithms or formulas used for any of this stuff. I have spent a week > searching and have found people using the Goertzel Algorithm, along with > other methods. I need to find the most straight-forward way to detect a > dialtone and other DTMF tones via my microphone input. I currently have > the capability through my code to capture audio from my telephone into a > buffer for processing, but I do not know where to go from there. Like > what Wav configuration do I need to capture my audio at for processing. > Currently I have an application that captures audio into a buffer at 44100 > samples per sec, 16 bits per sample, 2 channels. That is the way the class > was designed to capture the audio for processing. What is the most > straight-forward way to process the audio for tones and dialtones????? > Please Help.
Have you looked up the definitions of the tones you must detect/decode, and the standard (or your required) acceptance/reject criteria?
kgoodrich schrieb:
> I am trying to develop an application(in C#) that will be able to decode > DTMF tones coming in through my microphone input. My main focus right now > is to detect a dialtone. I am in no way familiar with any of the
[...] I am not sure about "ITU rules" for a dialtone, but there is/should be just this one peak at the give frequency. Also consider special dialtones at a PBX. At least in my experience here in DE, the PBX dialtone is a different one (pulsing) than the one from the FXO (continous).
> Currently I have an application that captures audio into a buffer at 44100 > samples per sec, 16 bits per sample, 2 channels. That is the way the class > was designed to capture the audio for processing. What is the most > straight-forward way to process the audio for tones and dialtones????? > Please Help. > > Thanks, > Kendal > >
Just a hint, if you can change the sampling rate, reduce it. If you can set it to 16k/sec you should be fine with POTS systems. they have a cut-off near 8kHz, so sampling with 16kHz should be enough. For waht to do when done with the samples, just do an FFT and see, which frequencies are there. - Just one at frequency f_1 -> Dialtone - Just one pulsing at f_2 -> Dialtone at a PBX - Two frequencies then check for each frequency, if it matches DTMF. That should be it. To the more advanced readers: Please bear with my clumsy attempt to help. I hope its not too confusing. HTH !! -- Kosta Xonis
>On Aug 8, 11:20 am, "kgoodrich" <kgoodr...@jeffersonmedical.net> >wrote: >> I am trying to develop an application(in C#) that will be able to
decode
>> DTMF tones coming in through my microphone input. My main focus right
now
>> is to detect a dialtone. I am in no way familiar with any of the >> algorithms or formulas used for any of this stuff. I have spent a
week
>> searching and have found people using the Goertzel Algorithm, along
with
>> other methods. I need to find the most straight-forward way to detect
a
>> dialtone and other DTMF tones via my microphone input. I currently
have
>> the capability through my code to capture audio from my telephone into
a
>> buffer for processing, but I do not know where to go from there. Like >> what Wav configuration do I need to capture my audio at for
processing.
>> Currently I have an application that captures audio into a buffer at
44100
>> samples per sec, 16 bits per sample, 2 channels. That is the way the
class
>> was designed to capture the audio for processing. What is the most >> straight-forward way to process the audio for tones and dialtones????? >> Please Help. > >Have you looked up the definitions of the tones you >must detect/decode, and the standard (or your required) >acceptance/reject criteria? > > >
I don't exactly follow when you saty acceptance/reject criteria. I know the frequency of the tones. IE: Dialtone = 350Hz & 440Hz, 2 = 697Hz and 1336Hz. That is about the most I know about the tones that I need to detect. Where would I go from there?
On Aug 9, 6:48 am, "kgoodrich" <kgoodr...@jeffersonmedical.net> wrote:
> >On Aug 8, 11:20 am, "kgoodrich" <kgoodr...@jeffersonmedical.net> > >wrote: > >> I am trying to develop an application(in C#) that will be able to > decode > >> DTMF tones coming in through my microphone input. My main focus right > now > >> is to detect a dialtone. I am in no way familiar with any of the > >> algorithms or formulas used for any of this stuff. I have spent a > week > >> searching and have found people using the Goertzel Algorithm, along > with > >> other methods. I need to find the most straight-forward way to detect > a > >> dialtone and other DTMF tones via my microphone input. I currently > have > >> the capability through my code to capture audio from my telephone into > a > >> buffer for processing, but I do not know where to go from there. Like > >> what Wav configuration do I need to capture my audio at for > processing. > >> Currently I have an application that captures audio into a buffer at > 44100 > >> samples per sec, 16 bits per sample, 2 channels. That is the way the > class > >> was designed to capture the audio for processing. What is the most > >> straight-forward way to process the audio for tones and dialtones????? > >> Please Help. > > >Have you looked up the definitions of the tones you > >must detect/decode, and the standard (or your required) > >acceptance/reject criteria? > > I don't exactly follow when you saty acceptance/reject criteria. I know > the frequency of the tones. IE: Dialtone = 350Hz & 440Hz, 2 = 697Hz and > 1336Hz. That is about the most I know about the tones that I need to > detect. Where would I go from there?
Would you accept or reject tones of 351 Hz and 441 Hz? If that's acceptable, how far off center frequency would the tones have to go for you to assume that a dial tone was not present? If a 1 second FFT found bin content at 350 and 440 cycles that was about 0.1 dB above the average noise floor, would you accept or reject that as a dial tone? etc.
Kosta Xonis wrote:
> Just a hint, if you can change the sampling rate, reduce it. If you can > set it to 16k/sec you should be fine with POTS systems. they have a > cut-off near 8kHz, so sampling with 16kHz should be enough.
Analog telephone service cuts off below 4KHz, not 8. T1 and E1 both have sample rate of 8KHz. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 Sometimes experience is the only teacher that works - Mike Rosing