Repository navigation
acture-live + acture-live-keywords: live input streams (voice, gestures, MIDI) to commands - #118
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-userUserLiveMap: 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 }, purecreateLiveMapper,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>; defaultwebSpeechEngine()(Web Speech API, continuous, each keyword reported once as soon as it appears, restart on end,processLocallywhen available:local: prefer | require | any).transportBindingsfor play / pause / next / previous with conservative synonyms. Pauses while the page is hidden; reports status.docs/research/live/): browser keyword spotting (engines, licences, energy), user-defined keywords and tuning, event grammars / stabilisation / fusion. Hand-written equivalentdocs/hand-written-live.md; skillacture-live; roadmap v1.19.Seams
sourceskeywordSource(),pushSource(name)enginewebSpeechEngine()gateDEFAULT_GATEuserMapcontextProvider() => ({})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
graceMsdefault for slow frame-wise classifiers, which is documented (a gesture binding setsgraceMsto 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 inparamsFrom, an optional occurrenceidon events,setUserMap, atiersfilter, 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 testgreen across the workspace locally (acture-live 48 tests, acture-live-keywords 21); CI green.