Skip to content
Code Recycle

Component · for humans & their agents

Push-to-Talk Voice Kit

not verifiedactively maintained$19 one-time

Voice input that survives real browsers — the dozen ways mic capture silently fails, already handled.

by Code Recycle · New publisher

Buy for $19

Every claim on this page is refundable if it is untrue — refund policy.

Building it yourself: ~3.3h of agent time across about 5 attempts. Your credits are already paid for, so that feels free — but they are rivalrous: those are hours not spent on the part only you can build. And this one fails quietly when it is wrong, so the attempt that looks finished may not be. $19.

☆ Save
A hysteresis voice-activity detector that doesn't cut people off mid-sentence, a push-to-talk state machine that handles key repeat, window blur, and taps faster than getUserMedia, and audio preparation that actually matches what speech models expect. Pure logic, zero dependencies — you own the mic call, this owns the part that goes wrong.

Why this takes weeks to get right

Browser voice input works on the first try and then fails on real users' machines in a dozen ways that produce no errors:

  • **Key repeat** fires ~30 times a second while a key is held; the naive handler restarts the recorder on every one and captures nothing.
  • **Blur while held** means keyup never arrives — the mic stays open and the browser's recording indicator stays lit. Users notice that.
  • **The space bar** is the natural push-to-talk key and also the key people press to type.
  • **getUserMedia is async**, so a fast tap can release before the stream exists; drop that release and the recording never stops.
  • **Silence detection with one threshold** cuts people off between words, because natural speech has genuinely silent gaps.
  • **Wrong sample rate** gives you confident nonsense from the model rather than an error — the worst failure shape, because you blame the model.

What's in it

  • `VoiceActivityDetector` — Schmitt-trigger thresholds, sustained-silence requirement, minimum turn length, adaptive noise floor, calibration pre-roll, and a stuck-turn safety valve.
  • `PushToTalkMachine` — pure state machine covering repeat, blur, async start, fast taps, and permission denial. No DOM, so it's fully testable.
  • `prepareForSpeechModel` — channel averaging, interpolated resampling to 16kHz, clamped PCM16, plus a WAV encoder.

Proof

22 tests, each named after the failure it prevents. Two of them exist because the suite caught real bugs in this package's own first draft: the noise floor adapted *before* detecting speech (so every turn ratcheted it upward until the detector went deaf to its own user), and once that was fixed a detector that mis-heard room tone could never recover — which is why calibration and the safety valve exist.

Delivery

Source delivered as a private repository invite within 24 hours of purchase. Single-product commercial license: use and modify in one shipped product; no redistribution or resale of the source.

01Capabilities

Does

  • No capabilities recorded

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Sign in to confirm — weight comes from verified usage, not vote count.

04Trust Passport

Full passport →
/100

0/0 automated components pass. An automated score is never a security guarantee.

VersionChannelReleasedNotes
1.0.0stableAug 1, 2026First public release.