When I try with audio archives through my computer, I have no problem, but when I connect my phone, nothing is detected. I have an issue with the detection of the DTMF tones. I don't know if that's actually part of the Goertzel algorithm itself.Īgain, great job and thanks for your help! I saw one implementation which divided the resulting magnitude by the number of samples. Is their any chance you could make it modifiable?Īlso, the goertzel algorithm is supposed to compensate for magnitude on its own. Try lowering the threshold amplitude just a bit. If for any reason the amplitude drops a bit to just below the threshold it can think it has seen the end of the tone when there's actually still more to come. When the code detects a tone it won't return it again until it sees something that is not a tone. If you do that, you'll have to reduce the threshold amplitude as well.Īnd if it plays too long it will put print the number multiple times. You could try making the sample length shorter (try 64) so that the algorithm samples the tone more times. It should have 3 good blocks in one 50ms tone and might detect tones down to around 30ms - I haven't tried that. The example code uses a sample length of 128 which means that a sample block is 14 milliseconds long. How short a tone are you trying? The dialabc example uses 50ms tones.
0 Comments
Leave a Reply. |