
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
tone-detector
Advanced tools
Simple library used to detect specific tones in audio input (e.g. from a microphone). For instance it can be used to trigger something when whisteling a certain tone or when an alarm goes off.
The detector uses sndpeek for audio input and feature extraction. Inspired and partly based on RobQuistNL's node-sndpeek. Tested on arch linux but may work on macOS and Windows too.
npm install tone-generator
Sndpeek must be installed.
Install sndpeek-alsa using your favorite package manager.
Install from source available here. RobQuistNL also distributes a binary built for ubuntu here.
Download the executable from here.
See the examples directory for two examples. One to report all detected tones and one to detect a specific tone.
After cloning this repository and running:
npm install
The examples can be executed through:
npm run report
and
npm run detect
Use report to identify the characteristics of a tone you want to detect, then use that information to configure detect to detect that specific tone.
Detection is started by calling the start function which takes an optional config object as parameter:
{
inputDevice // number identifying audio input device to use (default: 0)
sndpeekPath // path to the sndpeek executable (default: 'sndpeek')
maxToneCentroidOffset // maximum difference between detected tone and target tone to still consider it a match (default: 2)
targetToneCentroid: // Target tone (default: undefined)
}
Here's a minimal usage example where the config object is omitted:
const detector = require('tone-detector');
detector.on('event', e => console.log(e));
detector.start();
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
Tone detector
We found that tone-detector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.