Hi. I�m a newbie in this but I need to acomplish a job with this stuff. I�m capturing sound through the sound blaster and then need to detect if there were some DTMF. For this I�m using Goertzel. What I can�t understand is about buffering and samples, I mean: Do I have to run the goertzel for N=106 on each sample and sum all the results and then try to detect if there were DTMF or this is processing each sample?. I�m processing only one sample and the results are wrong, meaning I press 1 and it detects *, and so. Thanks in advance
DTMF detection and samples
Started by ●January 13, 2006
Reply by ●January 13, 20062006-01-13
dkurman wrote:> Hi. I�m a newbie in this but I need to acomplish a job with this stuff. I�m > capturing sound through the sound blaster and then need to detect if there > were some DTMF. For this I�m using Goertzel. What I can�t understand is > about buffering and samples, I mean: Do I have to run the goertzel for > N=106 on each sample and sum all the results and then try to detect if > there were DTMF or this is processing each sample?. I�m processing only > one sample and the results are wrong, meaning I press 1 and it detects *, > and so. > > Thanks in advance >You only need to run the Goertzel transform once per N samples, but you have to run it on all N of them. The result is invalid until the Nth sample though, so if you're doing your processing one sample at a time, only the Nth output is valid. Note that because of this, you can skip the feed-forward on all but the last sample. Once you've reached N, you'll need to reset the delay lines and start working on the next N samples. Failure to do this will yeild invalid results. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 Getting an inch of snow is like winning ten cents in the lottery - Calvin
Reply by ●January 13, 20062006-01-13
Thanks. This is the part I understand. The one I can�t get is about reading the samples, I mean, I can read N bytes from buffer, but puting it in a Byte array, so each sample will be of 1 byte(?). I need to read at least 4 samples of 2048 bytes each. I don�t know how to do this, but I think this would be a language development forum question, isn�t it? thanks again>dkurman wrote: >> Hi. I�m a newbie in this but I need to acomplish a job with this stuff.I�m>> capturing sound through the sound blaster and then need to detect ifthere>> were some DTMF. For this I�m using Goertzel. What I can�t understandis>> about buffering and samples, I mean: Do I have to run the goertzel for >> N=106 on each sample and sum all the results and then try to detect if >> there were DTMF or this is processing each sample?. I�m processingonly>> one sample and the results are wrong, meaning I press 1 and it detects*,>> and so. >> >> Thanks in advance >> > >You only need to run the Goertzel transform once per N samples, but you >have to run it on all N of them. The result is invalid until the Nth >sample though, so if you're doing your processing one sample at a time, >only the Nth output is valid. Note that because of this, you can skip >the feed-forward on all but the last sample. > >Once you've reached N, you'll need to reset the delay lines and start >working on the next N samples. Failure to do this will yeild invalid >results. > >-- >Jim Thomas Principal Applications Engineer Bittware, Inc >jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 >Getting an inch of snow is like winning ten cents in the lottery -Calvin>