just a random click detector for a goodie i got from bolt.new
Minimal real-time mechanical keyboard click detector for macOS using Bun/Node.js and the built-in microphone.
When a click is detected, it opens https://bolt.new in Google Chrome.
rec binary):brew install sox
bun install
bun start
This will:
https://bolt.new in Google Chrome when a click-like transient is detected.All detection parameters are defined near the top of click-listener.ts:
AMP_THRESHOLD: minimum RMS needed to be considered a candidate click.RATIO_THRESHOLD: required RMS spike vs. previous frame.ZCR_MIN / ZCR_MAX: expected zero-crossing-rate range for a click.COOLDOWN_MS: minimum time between detections.DEBUG: set to true to log sampled per-frame metrics.We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.