Splitting a DTMF signal from a wav file using Matlab

后端 未结 2 1936
走了就别回头了
走了就别回头了 2021-01-16 05:03

Here is the context of the problem: I have a DTMF signal in wav format, I have to identify the number sequence it has encoded. I must do so using fast fourier transform in M

相关标签:
2条回答
  • 2021-01-16 05:20

    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

    0 讨论(0)
  • 2021-01-16 05:40

    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

    0 讨论(0)
提交回复
热议问题