public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Fritz <wolfgang.fritz@gmx.net>
To: linux-kernel@vger.kernel.org
Subject: Re: [Asterisk] DTMF noise
Date: Wed, 08 Jan 2003 16:49:06 +0100	[thread overview]
Message-ID: <3E1C4872.7080508@gmx.net> (raw)
In-Reply-To: 3E1C1CDE.8090600@sktc.net

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/
 >





  parent reply	other threads:[~2003-01-08 15:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030107140012$1b66@gated-at.bofh.it>
     [not found] ` <20030107150006$4896@gated-at.bofh.it>
2003-01-07 19:08   ` [Asterisk] DTMF noise Thomas Tonino
2003-01-07 22:46     ` Roy Sigurd Karlsbakk
2003-01-08  7:51       ` Thomas Tonino
2003-01-08 12:43         ` David D. Hagood
2003-01-08 13:04           ` Matti Aarnio
2003-01-08 15:49           ` Wolfgang Fritz [this message]
2003-01-08 16:30             ` Wolfgang Fritz
2003-01-08 19:48             ` Andrew McGregor
2003-01-08 22:19             ` Jamie Lokier
2003-01-09 12:51             ` David D. Hagood
2003-01-09 13:31               ` Wolfgang Fritz
2003-01-09 23:32                 ` David D. Hagood
2003-01-10  6:52                   ` Matti Aarnio
2003-01-10 12:42                     ` David D. Hagood
2003-01-10 12:03                 ` Roy Sigurd Karlsbakk
2003-01-08 20:22           ` Thomas Tonino
2003-01-09 12:42             ` David D. Hagood
2003-01-07 13:55 Roy Sigurd Karlsbakk
2003-01-07 14:49 ` [Asterisk] " Mark Spencer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E1C4872.7080508@gmx.net \
    --to=wolfgang.fritz@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox