Effacer les filtres
Effacer les filtres

Trying to determine DTMF from .wav file

7 vues (au cours des 30 derniers jours)
Amritpal Kaur
Amritpal Kaur le 2 Déc 2016
Commenté : Star Strider le 2 Déc 2016
So I am trying to determine the numbers dialed in a DTMF wave file by reading the [x, y] co-ordinates of the Fourier analysis plot. The numbers are: 251216. Here is my Matlab code for the same:
% Tone Dialling %
[y,Fs] = audioread('tones.wav');
n = length(y);
p = abs(fft(y));
f = (Fs/n)*(0:n-1);
plot(f,p);
axis([500 1400 0 1000])
xlabel('f(Hz)')
title('Power')
This corresponds to the following plot:
Now this should have 6 peaks, but doesn't! Where am I wrong? The clip is a 6second clip, pulse being played after every 1 second.
Any help is appreciated.

Réponses (1)

Star Strider
Star Strider le 2 Déc 2016
  2 commentaires
Amritpal Kaur
Amritpal Kaur le 2 Déc 2016
I found this out, but I would love to learn it from my code. I am not trying to get a solution but rather learn where I am mistaken.
Star Strider
Star Strider le 2 Déc 2016
You have to use some sort of time-frequency detection method, since the frequencies vary with time. You could create bandpass filters for the various DTMF combinations and code the output so that when a particular combination was ‘high’ that number would be saved, but the times vary enough to make this very difficult. (This is from my personal experience, and the reason I ended up using the spectrogram.)
You can also experiment with wavelets, if you have the Wavelet Toolbox. You will encounter the same problem with timing.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by