how to split signal in dtmf program

26 views (last 30 days)
MU on 18 Feb 2013
I was doing decoding phone number project using FFT algorithm, i do not know how to set up an rule for setting an threshold to split signal into several segment, and also how to do it in matlab code, so can anyone help me please, here is what i did right now.
[y,Fs,bits] = wavread('PhoneNumberA_2013.wav');
Nsamps = length(y);
t = (1/Fs)*(1:Nsamps) %Prepare time data for plot
%Do Fourier Transform
y_fft = abs(fft(y)); %Retain Magnitude
%y_fft = y_fft(1:Nsamps/2); %Discard Half of Points
f = Fs*(0:Nsamps-1)/Nsamps; %Prepare freq data for plot
%Plot Sound File in Time Domain
plot(t, y)
xlabel('Time (s)')
title('PhoneNumberA frequency in Time Domain')
%Plot Sound File in Frequency Domain
plot(f, y_fft)
axis([0,1800 0 600])
xlabel('Frequency (Hz)')
title('PhoneNumberA frequency in Frequency domain')
i am sorry because i do not how to upload my image, but i am pretty sure till now the code i upload is correct, please help me~
thank you

Answers (1)

Youssef  Khmou
Youssef Khmou on 18 Feb 2013
hi MU,
in DTMF ( Dual Tone Multi Freqency) the phone number is composed of 11 digits, so you need to divide the length of y or Nsamps according to your code into 11 equal segments y1,y2,.......y11 and for each yi compute the Amplitude spectrum ,extract the two frequencies (697 770 852 941 1209 1336 1477 ) Hz and use conditioning test to recognize the digits :
%construct a matrix that contains the segments A(n,11) :
%Now compute the spectra : FFT(A(:,1)..................A(:,11)
% Extract the frequencies and store them in B(11x2) matrix such that every
% row contains one DTFM
% use conditioning test
I hope that helps
Youssef  Khmou
Youssef Khmou on 18 Feb 2013
hi, alright, anyway he can define the number by counting the peaks in the time domain .

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!