Matlab :detect frequency of dtmf tone (.wav )file

In summary, The conversation is about finding the frequency of a DTMF tone in a .wav file using MATLAB. The speaker is attempting to use the "find" function and the FFT method, but is having trouble with the large number of results. They mention another method involving the frequency with the highest magnitude, but they are unsure of how to implement it.
  • #1
mohajernow
2
0
a question in MATLAB ?
i have a DTMF tone as a ( .wav ) file and i want to detect
its frequency then i want to know the number which
the tone belong to

note i have a .wav file and i want to detect it


i am trying forrier then using "find function "in matlab
but the result of "find " have a lot of number
what i can do to solve this problem

here is my attempt

[y1,fs,n]=wavread('tone4.wav');
Ts=1/fs
y=fft(y1);
y=Ts*fftshift(y);
freq =find (y)
 
Last edited:
Physics news on Phys.org
  • #2
i found another way to know the frequency but i do not konw how to use it
the methode depend on finding the frequency which has the highest magnitude

i do not know how to get the highest magnitude
 
  • #3



Hello,

To detect the frequency of a DTMF tone in a .wav file, you can use the MATLAB function "audioread" to read the file and then use the "fft" function to perform a Fast Fourier Transform on the signal. This will convert the time domain signal into the frequency domain. From there, you can use the "find" function to locate the peaks in the frequency spectrum, which will correspond to the DTMF frequencies.

However, as you mentioned, the "find" function may return a lot of numbers, as there may be multiple frequencies present in the signal. To solve this problem, you can use the "max" function to find the maximum value in the frequency spectrum and then use the "find" function again to locate the index of this maximum value. This index will correspond to the dominant frequency in the signal and can be used to determine the DTMF number.

I hope this helps. Let me know if you have any further questions.
 

1. How can I detect the frequency of a DTMF tone in a .wav file using Matlab?

In order to detect the frequency of a DTMF tone in a .wav file using Matlab, you can use the built-in function "audioread" to read the audio file and then use the "fft" function to convert the audio signal into the frequency domain. From there, you can use the "findpeaks" function to identify the peaks in the frequency spectrum and determine the frequency of the DTMF tone.

2. Can I detect multiple DTMF tones in a single .wav file using Matlab?

Yes, you can detect multiple DTMF tones in a single .wav file using Matlab by dividing the audio signal into smaller segments and running the frequency detection algorithm on each segment. You can then combine the results to identify all of the DTMF tones present in the file.

3. Is there a specific range of frequencies for DTMF tones that Matlab can detect?

Yes, the range of frequencies for DTMF tones that Matlab can detect is between 697 Hz and 1633 Hz. These frequencies correspond to the 16 different DTMF tones used in telephone keypads.

4. Can I use Matlab to detect DTMF tones in real-time?

Yes, you can use Matlab to detect DTMF tones in real-time by using a microphone to capture the audio signal and then running the frequency detection algorithm on the live data. This can be useful for applications such as automated phone systems.

5. Are there any limitations to using Matlab to detect DTMF tones in a .wav file?

One limitation of using Matlab to detect DTMF tones in a .wav file is that it relies on the accuracy of the audio file itself. If the recording quality is poor or there is background noise, it may affect the accuracy of the frequency detection algorithm. Additionally, Matlab may not be able to detect DTMF tones that are played at very low volumes or are masked by other sounds in the audio file.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top