Skip to content

acture-live + acture-live-keywords: live input streams (voice, gestures, MIDI) to commands - #118

Merged
thorwhalen merged 3 commits into
mainfrom
feat/live
Dec 1, 2026
Merged

thorwhalen merged 3 commits into
mainfrom
feat/live

Conversation

@thorwhalen

@thorwhalen thorwhalen commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Live input streams to commands: say "next" and the player skips, hold up a palm and it pauses, play a chord and a loop starts.

What

  • acture-live (new, core, modality-free): detections { source, label, score, t, values? } from any live stream → JSON bindings (+ a sparse end-user UserLiveMap: replace / add / remove per command, per-word tuning) → one edge-triggered gate (threshold, hysteresis, dwell, cooldown, grace, cross-source dedup), on event time only so recorded traces replay exactly → registry.dispatch. bindLive(registry, { sources: { voice: … }, bindings }) → { ready, setUserMap, stop }, pure createLiveMapper, detectConflicts, pushSource (bridge any existing detector), replaySource. No DOM, audio or models.
  • acture-live-keywords (new, first plugin): spoken keywords as a source. Engine seam ({ keywords, onDetection }) => Promise<stop>; default webSpeechEngine() (Web Speech API, continuous, each keyword reported once as soon as it appears, restart on end, processLocally when available: local: prefer | require | any). transportBindings for play / pause / next / previous with conservative synonyms. Pauses while the page is hidden; reports status.
  • Research (docs/research/live/): browser keyword spotting (engines, licences, energy), user-defined keywords and tuning, event grammars / stabilisation / fusion. Hand-written equivalent docs/hand-written-live.md; skill acture-live; roadmap v1.19.

Seams

seam v1 default replacement pointed at
sources keywordSource(), pushSource(name) gesture / MIDI detectors in consuming apps
engine webSpeechEngine() streaming KWS in WASM behind a VAD (#116)
gate DEFAULT_GATE per-binding gesture settings, per-user tuning
userMap empty an end-user editor (#117 for calibration/enrollment)
contextProvider () => ({}) app state for when-clauses (the clutch)

NOT seams: label matching (exact), dispatch, event clock.

Review

An adversarial review (two passes, with a probe script) found 15 then 8 defects; all are fixed with regression tests except the graceMs default for slow frame-wise classifiers, which is documented (a gesture binding sets graceMs to at least twice its frame interval). Public shapes changed before the first publish as a result: named sources with per-source vocabulary, tuning as a list keyed by label and optional source, user triggers that inherit params and gate settings, $-prefixed event fields in paramsFrom, an optional occurrence id on events, setUserMap, a tiers filter, and a sanitized (untrusted) user map. Follow-ups: #116 (low-energy engine), #117 (calibration and enrollment).

Release

Both packages start at 0.1.0 through the changeset. They are new npm names: the first publish goes out by hand, then trusted publishing (the release run will report E404 for these two until then; other packages are unaffected).

Gate

pnpm build && pnpm typecheck && pnpm test green across the workspace locally (acture-live 48 tests, acture-live-keywords 21); CI green.

…t streams to commands)

Detections from any live stream ({source, label, score, t, values}) route to
registry commands through JSON bindings, a sparse user override map with
per-word tuning, and one stabilising gate (threshold, hysteresis, dwell,
cooldown, grace, cross-source dedup). First source: spoken keywords with a
swappable engine (default: Web Speech API, on-device where available) and
play/pause/next/previous bindings. Research in docs/research/live/.
Named sources with per-source vocabulary; gate state per (binding, label,
source); tuning as a list keyed by label and optional source; user triggers
inherit source/params/gate from the developer binding; sanitized user map;
setUserMap restarts changed sources; contained callbacks; tiers filter;
negative time gaps are no relation; $-prefixed event fields in paramsFrom.
Keywords: no engine leak on hide-during-start; per-keyword occurrence counts
across interim revisions; final confidence re-reported with the first stamp;
restart backoff; audio-capture fatal; resolve only once listening.
Occurrence ids on events: the gate fires at most once per id, and a late
re-report fires only if its occurrence never did (no double dispatch when a
recogniser's final result follows the interim). Late events without an id
are ignored; cross-source dedup is symmetric; gate settings from JSON are
validated (null or out-of-range dropped); user triggers inherit source only
when the developer bindings agree, '*' means any; user-map edits are
serialized and never overlap a pending start. Keywords: silence restarts
without backoff; a start made stale by a hide restarts when visible again.
@thorwhalen
thorwhalen merged commit 03f5ad3 into main Dec 1, 2026
2 checks passed
@thorwhalen
thorwhalen deleted the feat/live branch December 1, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant