Skip to content

tikabass/tika-dtmf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DTMF-Decoder library.

Single include file DTMF decoding library for x86 computers.

This library provides stable and dependable DTMF detection for embedded applications.  Requires c++71+.

Features:
    - Sensitivity: -27dB
    - Min SnR ratio 3dB
    -Tailored for compatibility with ITU Q.24 Specification (https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-Q.24-198811-I!!PDF-E&type=items)
    - High troughput, lazy algorithm for minimal CPU usage.
    - AVX2, FMA3, SSE4.1 and SSE2 hardware acceleration, selectable at compile-time.
    - Code does not allocate memory, and does not raise exceptions.
    - Small memory footprint (768 bytes per channel).
    - OS agnostic.

Directory structure:

    + benchmark             Benchmarks
    + documentation         Doxygen documentation make files
    + src                   The library
    + test                  Unit testing files
    + testlib               DTMF generator used for unit testing

License:

    MIT Licence.  Free to usee in commercial projects.

Usage:

<code>
struct channel
{
	tika::dtmf_decoder dtmf_filter_;
	// ...

	void on_key_down(char key) {
		// key was pressed
		// process key...
	}

    void on_key_up(char key) {
		// key was released
		// process key...
	}

    void setup() {
		// connect to key events	
        dtmf_filter_.on_key_down([this](char key) { this->on_dtmf_key_down(key); });
		dtmf_filter_.on_key_up([this](char key) { this->on_dtmf_key_up(key); });
		// ...
	}

	// this function is called when audio data is available.  Audio samples can be 
	// either uncompressed PCM 16-bit signed integers or 32 bit floats.
	void on_audio_data(size_t sample_count, const uint16_t* samples) {
		// feed audio data to the filter
		dtmf_filter_(sample_count, samples);
		// do other processing...
	}
	// ...
};
</code>

About

Single header file DTMF detection library for x86

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •