How to remove Silence from an that has DTMF tones in it?
조회 수: 1 (최근 30일)
이전 댓글 표시
The input to my file is are the DTMF digits but since it has silence intervals in it, i.e., 'beep',silence,'beep',silence, and due to this silence when fft is taken,The system cannot identify the correct frequencies of dtmf so how can i remove this silence?
댓글 수: 0
답변 (1개)
sandeeep jan
2017년 10월 4일
편집: Walter Roberson
2021년 11월 21일
Fs = 8000;
t = 0.25;
N = 1:ceil(t*Fs);
% define DTMF:
R = [697,770,852,941]; % Hz, rows
C = [1209,1336,1477]; % Hz, columns
[Ra,Ca] = meshgrid(R,C); % Hz, all
Rb = 2*pi*(Ra(:)/Fs);
Cb = 2*pi*(Ca(:)/Fs);
T = sin(Rb*N) + sin(Cb*N);
% get user input:
J = '123456789*0#';
% subplot is by row
I = input('Enter keys/s [0:9*#]: ','s');
assert(all(ismember(I,J)),'An invalid key was entered')
% plot and play:
for k = 1:numel(I)
X = strfind(J,I(k));
subplot(4,3,X);
plot(T(X,:));
xlabel(sprintf('KEY%s',I(k)))
sound(T(X,:));
pause(0.5);
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 DTMF에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!