Re: [Asterisk] DTMF noise

From: Wolfgang Fritz (wolfgang.fritz@gmx.net)
Date: Wed Jan 08 2003 - 10:49:06 EST


David D. Hagood wrote:
> Thomas Tonino wrote:
>
>> Roy Sigurd Karlsbakk wrote:
>>
>>> so - we DO NOT need a 'simplistic' DTMF decoder.
>>
>>
>>
>> You need a good one. But good can be simplistic, is what I'm saying.
>>
>> DTMF was designed to be easy to decode reliably. Complex doesn't
>> automatically mean better.
>>
>
> I haven't looked at the code, but I'd recommend using a bank of Goertzel
> filters -
>
>
>
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Goertzel+filter+DTMF&btnG=Google+Search

>
>
> The basic idea is that you have 8 filters (for the 4 row and 4 column
> frequencies), as well as 8 filters looking at the first harmonic of the
> 8 frequencies. You then compare the energies in each frequency - if you
> see significant energy in the harmonic filter bank, discard the signal.
> That prevents you from detecting speech as DTMF, since speech will
> usually have harmonics that a good DTMF signal won't.

That is done in the isdn_audio DTMF detection but did not work very well
with a number of phone sets I tested which seem to generate DTMF tones with
strong harmonics. They may be out of spec but they exist.

I have a patch which adds a simple energy comparison and some
plausablility checks to the DTMF eval code but does not look at the
harmonics. That improved the detection with above phone sets.

Maybe it would be better to reenable harmonic checks but comparing
harmonic levels to the level of the fundamental instead of using
absolute values as in the present implementation.

OTOH I don't think its a good approach to check harmonics anyway but to
check other non DTMF frequencies in the main speech band and only accept
a DTMF if a DTMF frequency pair is present but no signal on the non DTMF
frequencies (no signal = xxx dB below the detected DTMF levels).

There exists a long text about DTMF detection somewhere on the net (I
may have the link in the office but I'm on vacation now). What I
remember is that a "correct" DTMF detection requires much more computing
power as the present i4l implementation needs (much longer audio samples
for the goertzel filter, a larger number of frequencies to check) and a
standard test procedure with a lot of test cases which are not available
to mortal humans (audio tapes from Bellcore IIRC)

Wolfgang
>
> Since the Goertzel filters are simple, they can be implemented in fixed
> point math rather than floating point. At work, we've done this on a
> Motorola 56301 DSP, which is a fixed-point DSP. I think there's an app
> note from Moto on this - I'll check when I get into work today.
>
> -
> To unsubscribe from this list: send the line "unsubscribe
linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:24 EST