Git Product home page Git Product logo

sndgrep's Introduction

sndgrep - Search for specific frequencies (tones) in PCM audio

What

sndgrep searches a provided input file or direct PCM stream of audio data for a specified tone. This tool was originally designed to find DTMF tones in audio streams.

This tool can also generate tones (including dtmf) and write that output to a file. However, that is not the primary use of this tool. Personally, I am thinking about making this tone-generation feature only available in debug mode.

Note that this searches for the specified tone one second at a time.

This is pre-alpha and there is a ton of testing that needs to be done. Primarily, I only care about DTMF, so traditional tones have not been tested (e.g., you can feel free to test these by NOT specifying the --dtmf command line argument).

Running a test make test will overwrite any files named: test.dat, test[0-9].dat

Limitations

Currently this tool only supports PCM as input to search, or output to create. Specifically, 64bit PCM at an 8kHz sampling rate.

TODO:

  • Support fractional frequencies
  • Support multiple input and output formats
  • More testing
  • Better searching (more fine than one second a time)

Dependencies

libfftw: Fourier Transform Library http://www.fftw.org

libalsa: (optional) Advanced Linux Sound Architecture http://www.alsa-project.org/

Optional Build Settings

Generated audio can be directly played from sndgrep, but sndgrep must be built and the optional "libalsa" dependency is required. To achieve this annoying feature build sndgrep as: make EXTRA_CFLAGS="-DDEBUG_PLAYSOUND -lasound"

Examples

  • Generate a 1 second DTMF tone of the '5' key: sndgrep --dtmf --generate -d 1 -t 5 myoutput.pcm

  • Search for all DTMF number tones in a provided input file: sndgrep --dtmf --search somefile.pcm

  • Search for all DTMF number tones in an audio stream: sndgrep --dtmf --search < /dev/mystream

Super Awesome Resources

Contact

enferex [email protected]

sndgrep's People

Contributors

enferex avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.