linux-DTMF decoder
DTMF decoder based on multimon and SoX.
Dependencies
This module requires installed multimon, Sox. For decodign mp3 files/streams, you can install libsox-fmt-mp3
For Ubuntu, Debian and Debian-based dist:
apt install multimon sox libsox-fmt-mp3
Usage
See demo.js in demo folder
File decoding
Supports wav, ogg and raw from scratch. MP3 supported with libsox-fmt-mp3
const LDTMF = ;const dtmf = ; let decodeResult = await dtmf;console;
Buffer decoding
const LDTMF = ;const dtmf = ; let dataBuffer = fs; let decodeResult = await dtmf;console;
Stream decoding
const LDTMF = ;const dtmf = ; let dataBuffer = fs; dtmf; dtmf; //Decode streamlet buffer = await dtmf;buffer;
Events
LDTMF is an event based module.
.on('data', (data)=>{})
Decoded data
.on('end', ()=>{})
Decoder stopped