Splitting a DTMF signal from a wav file using Matlab

偶尔善良 提交于 2019-12-01 14:15:29

I would recommend the following approach:

  • Find the envelope of the signal in the time domain (see Hilbert transform).
  • Smooth the envelope a bit.
  • Take the diff and find peaks to get the onsets of the tones.
  • Use the onsets to pick frames and find the spectrum using fft.
  • Find the index of the max in each of the spectrums and convert them to a frequency.

The tricky part in this is to get a robust onset detector in point 3. The peaks in the difference you pick, has to be of a certain size in order to qualify as on onset. If your tones are of varying strength this might pose a problem, but from your image of the time signal it doesn't seem like a problem.

Regards

This worked for me:

windowSize = 256;   
nbWindows = floor(L / windowSize);

for i=1:nbWindows
    coeffs = fft(signal((i-1)*windowSize+1:i*windowSize));    
    plot(abs(coeffs(1:N)));
    waitforbuttonpress
end;

This way it is possible to shift the window until the end of the input signal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!