Skip to content

girish-io/dtmf-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DTMF Decoder

Decoder for dual-tone multi-frequency (DTMF) signals.

Demo video

Decoding Dual-tone multi-frequency (DTMF) Signals

Setup

  1. Install dependencies
pip install -r requirements.txt
  1. Run the demo

The script comes with 3 demos;

One for decoding the signals as they are detected, another one for live plotting the signals, and lastly one for executing commands when a predefined signal was detected.

Live decode:

python -m dtmf_decoder

Live plot:

python -m dtmf_decoder live-plot

Command decoder:

python -m dtmf_decoder command-decoder

Implementation Details

The decoding process works in the following series of steps:

  1. The input signal is fed into a Goertzel filter which allows us to unravel the signal into frequencies and their associated energy levels.

  2. The two frequencies with the highest energy levels are picked and mapped to the closest lower and higher frequencies according to the DTMF keypad matrix.

  3. Finally the mapped frequencies are looked up in a "keypad table" with the result being the key that was encoded in the DTMF signal.

Plot for a DTMF Signal

Example plot for a DTMF signal representing the key "7" along with its Goertzel filtered output.

Note

I thought this was a fun project to do in my free time to get the basic idea of how DTMF signaling works and was mainly inspired by this scene from The Hummingbird Project where Anton sent commands to his computer over a telephone network from jail.

About

Decoder for dual-tone multi-frequency (DTMF) signals.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages