Decode the keys in DTMF using FFT

UPDATE:
The problem was solved! See the first comment.
I need to detect the keys pressed in the wav file using the FFT. But I'm completely stuck with it, just don't know what to do. I have read that you can detect the tones with the help of Goertzel algorythm, but, again, I haven't found nor explanation for it nor any example of working code. With audioread I got the wave and created the plot of it, but what should I do next to identify the frequencies for each key and filnally the keys?
Can someone please share with me an algorithm how to solve this problem?

9 comentarios

Pavel Musorsky
Pavel Musorsky el 23 de Mzo. de 2020
Finally I have made it! I don't clearly understand it whole cause I used the documentation about Goertzel but it works!
IT JUST WORKS!
Remembering all the pain I got during creation of it I will leave it there. In hope that it will save someone in future.
Abigail Nwk
Abigail Nwk el 2 de Jun. de 2020
Thank you so much!! can i have the audiofile that you used ? the qwer.wav
Pavel Musorsky
Pavel Musorsky el 2 de Jun. de 2020
Editada: Pavel Musorsky el 2 de Jun. de 2020
Just use this site to create any sequence of keys and download the wav file.
Then rename it appropriately and put it in the folder where your matlab code lies. I promise you the code will give you the same sequence.
Abigail Nwk
Abigail Nwk el 2 de Jun. de 2020
It finally worked!
I used other dtmf generators and couldn't get the same sequence. Now i tried with the generator you gave and it worked
Thank you
Pavel Musorsky
Pavel Musorsky el 2 de Jun. de 2020
My code is not an absolute solution and I still don't know how exactly it works. But did your generator have 9 keys or 16 like mine?
Abigail Nwk
Abigail Nwk el 6 de Jun. de 2020
The generators i used had 16 keys too. I need this for a project, and now that the code works i have to explain every instruction used
Muhammad Shafiq
Muhammad Shafiq el 1 de Sept. de 2020
Hi guys the code FFT.m is not running properly ,I have set the path of audio file properly. Need guidance in running FFT.m. Thanks
Pavel Musorsky
Pavel Musorsky el 1 de Sept. de 2020
Did you use the wav file? And does it lie in the same folder as your project?
Abdul Rahim Mohammad
Abdul Rahim Mohammad el 16 de Sept. de 2020
Editada: Abdul Rahim Mohammad el 16 de Sept. de 2020
Hi Pavel,
I used the code with a wav file generated from your suggested link but the following error pops up:
Output argument "c" (and maybe others) not assigned during call to "FFT>detect".
Error in FFT (line 27)
KEYS = [KEYS,detect(val)];
Could you also specify how to use the mat file as well, as in how to use the generated wave file and your file?
I reckon this might be a incomplete code snippted since the function you made takes no input arguments, I am sorta new to MATLAB and this seems extemely out of place compared to python. Thanks!

Iniciar sesión para comentar.

Respuestas (1)

Leonardo Aquino
Leonardo Aquino el 14 de Jun. de 2021
hi @Pavel Musorsky, i have a problem with the ejecution your code, i have this error:
Error using reshape
Size arguments must be real integers.
Error in fft (line 11)
dataS = reshape(data(1:height*width),width,height)

Etiquetas

Preguntada:

el 22 de Mzo. de 2020

Respondida:

el 14 de Jun. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by