Skip to content

Integrate bounded Linux voice sessions and observed playback interruption

Use the Linux voice-session workflow when you need bounded capture, follow-up turns, barge-in, or playback interruption handling. The current path keeps capture, interpretation, and playback separate, uses a finite session window, and treats audio and text as transient. Continuous capture and an actual echo path are required for duplex. Fake PCM and control fixtures prove wiring, not acoustic performance.

The adapter uses Endpointer:16kHz mono signed16-bit PCM, adaptive room floor, minimum speech, trailing silence, no-speech timeout, and a 15-second utterance cap. A driver supplies current tenant, home, device, binding revision, and boot epoch and advertises continuous capture plus the actual echo path. A wake starts one finite 1–60-second platform session. Followups reuse it until timeout, close, or changed enrollment.

AudioDriver owns capture and existing DSP or playback-reference echo cancellation. ReplyOwner owns rendering and playback. PhysicalAiAudioSession creates session and turn IDs, bounds chunks at 100ms, admits one interpretation, and withdraws superseded replies. Barge-in cancels only its inference or reply. Duplex requires an explicitly qualified echo path; missing references or an unresolved interruption safely close the session. No MCU capture fields or catalogue allocation are introduced.

The Linux GatewayMeaningAdapter sends original bounded 16kHz mono PCM, current broker credential proof, and the original audio-session and unique turn IDs through the private DeviceService to TenantService to AIgateway interfaces. prepared_session_pool accepts installed current enrollment, actual AudioDriver, and ReplyOwner callbacks. It has no discovery, copied actuator executor, or automatic native-satellite continuous capture. Default SHADOW emits neither effects nor a spoken reply. ACTIVE keeps pending physical outcomes independent from playback and model response cancellation.

The existing hosted hub HTTP entrance reads the current credential and boot session header; phone talk sends its finite x-alyt-audio-session UUID with the current authenticated household token. The selected phone path accepts only complete bounded mono PCM WAV, never queues the same audio to the legacy agent, retains at most 128 selected turn records, and admits at most 4 unfinished selected turns. Its rendered phone clip is tenant-bound. The existing mobile Talk panel separates physicalAction from reply playback: admission or PENDING cannot display successful physical completion. A rendered clip alone is not audible playback. A requested room speaker has its original playback owner; phone-only rendered replies never claim room playback.

The Sonos interruption endpoint operates through SecurityMediaGate and the existing durable media journal. It removes unsent clips, requests the same restoration path, and cancels only the stored session appId. CONFIRMED requires the owner’s observed terminal or restored result. UNKNOWN retains recovery; SECURITY_OWNED preserves Home Security takeover. It does not rewrite music volume, regroup rooms, or claim an action reversed. Existing close semantics continue to finish queued speech.

Sonos retries after observed restoration return CONFIRMED. Current Home Security ownership returns SECURITY_OWNED, including takeover during interruption; UNKNOWN remains recoverable. The durable original snapshot, session appId, and settling lease remain with the existing owner. An interrupt request withdraws unsent clips without erasing current physical outcome or claiming silence before observation.

Keep the current hosted, SELF, and phone route until its new path is independently qualified and selected. A satellite without a continuous-capture driver retains the existing wake path. Fake PCM, semantic adapters, and playback-reference drivers verify session plumbing; real recognition, TTS, acoustic echo, latency, and target hardware are separate evidence. Disable the new sessions and preserve the ordinary wake path on rollback.

Withdraw capture after an audio-owner fault

Section titled “Withdraw capture after an audio-owner fault”

Echo processing exceptions, the one-second echo deadline, cancelled capture processing, invalid returned PCM framing, and playback-interruption failures now withdraw the bounded active capture session and close its capture owner. Completed behavior keeps pending or sent physical results independent, so a faulty audio owner cannot create a follow-up interpretation or undo an action. Ordinary wake/reply selection stays unchanged, and existing session selection remains separate from acoustic qualification. Prepared modules are installed without automatic session selection or acoustic qualification.

On the installed local voice path, an identical audio retry within the current receipt window reuses the original transcript and receipt instead of starting a new ASR pass. The original caller deadline stays in force, and the current authority is checked again before replay completes.

While one audio turn is being admitted or interpreted, a new audio or text turn is busy and does not enter the slot. If ASR fails, is cancelled, or returns late, the admission slot is released when that owner returns so the system can continue with the original session state.

The replay record is in-process only: the system keeps the original bounded receipt and a digest, not raw PCM, and it refuses any changed bytes or bindings under the same request identity.

Cancel partial private-owner responses cleanly

Section titled “Cancel partial private-owner responses cleanly”

If the private owner starts a JSON response but the caller aborts before the body is complete, the client stops waiting and withdraws its current reader instead of accepting a streamed prefix as a transcript, query result, or outcome. This applies even when headers have already arrived or only part of the body has been received. The original caller deadline still applies, and normal request limits, authentication, redirect refusal, and outcome recovery remain unchanged. This transport withdrawal is separate from any proof that a model driver or a physical action has stopped.

Use the existing Linux source-facts/capture profiles with requestFactsVersion: "alyt.request-source-facts/1.0.0" and modelViewVersion: "alyt.source-model-view/1.3.0" only when the explicit PHYSICAL_AI_LINUX_REQUEST_FACTS_PROPERTY_IDS selection is present. Keep the current source request shape (requestFacts: {version, originalRequestId}) unchanged, and read the original source pair together with every historical control and observation.

Treat the current actor/home/session as explicit inputs; changed actor/home/session, a displaced or expired original record, or an unavailable slice returns UNKNOWN or refusal. Historical observations, ACK/CONFIRMED state, or a matching value do not establish current state, intent fulfillment, or a fresh guard. Preserve distinct original/current namespaces and owner target mapping; actual admitted proposal replacement, effect, execution, and the original authenticated Outcome GET remain the only valid lineage evidence.

Keep the finite pending/exchange retention, byte/token/read/session limits, and reversible formatter/tokenizer qualification. Oversized source slices stay withheld as a whole. To roll back, disable the explicit companion profile or restore the single matching package rollback; preserve original traces and failed attempts. The companion still supplies no next plan, grant, actuator, or automatic retry.

Scoped unsent withdrawal for voice-session audio

Section titled “Scoped unsent withdrawal for voice-session audio”

Use scopedSemanticVersion: "alyt.scoped-semantic/1.0.0" with the complete source1.3/capture/request-facts installation. Call /tokenize-scoped-semantic and /reason-scoped-semantic with {schemaVersion: "alyt.scoped-semantic-input/1.0.0", profile, view}; keep view as the unchanged original source packet. The tokenizer returns the separately profile-bound alyt.scoped-semantic-token-count/1.0.0 proof for the entire actual prompt. Preserve 4,096 input tokens and 1,024 output tokens, the original 19-second deadline, two reads, and three calls.

The reply alyt.scoped-semantic-model-reply/1.0.0 contains profile, measured outputTokens, pendingRevision and result. Native/selection/ASK/UNAVAILABLE behavior remains available with null pendingRevision. Accept only frozen REJECT_PENDING whole-plan rejection/deferral: original pending_ref, exact literal source pending revision, no operations, and context_refs containing only that ref plus native/query null. No partial edit, approval, send, physical undo, or renewed authority is supplied.

The original router/controller/ledger own withdrawal. Enable the explicit home profile and installed policy. Shadow mutates no ledger; ACTIVE additionally requires scopedSemanticActive, the scoped semantic active home selection, and existing Speech active admission. A changed/expired pending plan, revoked actor/profile, or begun/unknown physical attempt refuses without withdrawing the current plan. Exact retry uses the same original receipt and actor checks, without another decode. Disable the explicit profile/cohort or restore the one matching package for rollback. Preserve physical-outcome history and keep fixture/model/target acceptance separate.

Speech timing trace and installed dispatch

Section titled “Speech timing trace and installed dispatch”

Select turnTraceVersion: "alyt.local-voice-turn-trace/1.0.0" in the installed Linux router configuration. It is off by default. The trace emits one diagnostic per turn to the service journal and joins original request/session/segment and installed artifact IDs across ASR, source/authority reads, graph/model/query, controller and original outcome boundaries. Failed or aborted turns and replay remain visible. Diagnostics omit raw speech, text, model responses, credentials and device values. Telemetry does not hold foreground admission or change the original controller result. The fixed private x-alyt-audio-timing header binds original IDs and PCM SHA256 for alyt.local-audio-timing/1.0.0; reception and endpoint detection stay separate from the final spoken sample.

Read actual dispatch and correlated observations from original validated outcome receipts by effect and command identity. Controller-call return, ACK, chime and a thinking message are not observed physical success. Missing final-sample clock correlation, authorization instant, load, init, queue and cache data remain unmeasured. A separate alyt.local-voice-ux-requirement/1.0.0 records a proposed, unachieved500ms p95 ordinary immediate authorized-dispatch target after final spoken sample;19s/30s remain abort ceilings, not public promise. Preserve stricter original requirements. Software traces and an isolated fast command do not qualify microphone, neural quality, physical effects or complete system on the actual2GB RK3562. Disable the trace profile or restore the sole matched package for rollback; retain history.

Reception and energy timestamps remain UNQUALIFIED as a final spoken sample.

Reception and energy timestamps remain UNQUALIFIED as a final spoken sample.

AlsaCaptureDriver installs an explicit ALSA capture owner for operator-selected hw:card,device or plughw:card,device input. It binds to the existing PhysicalAiAudioSession and prepared_session_pool with the original AudioBinding, the enrollment/microphone-consent predicate, and the retained ReplyOwner. NONE is the advertised echo path for this raw ALSA route; it is not duplex-qualified, while duplex remains with the existing qualified DSP/reference owner. Capture stops before reply preparation, late frames are ignored after stop, and a fresh selected-home wake is required to reopen capture. Actual WAV-header validation, bounded 100 ms PCM chunks, EOF/withdrawal cleanup, and bounded kill on ignored termination preserve the bounded-buffer and cleanup behavior. No host/hub reroute, default change, or new model/firmware behavior is introduced.

PhysicalAiAudioSession keeps a 240000-sample, 15-second per-request bound in GatewayMeaningAdapter and LinuxMeaningAdapter. If speech is still active at the cap, or the final chunk would exceed the bound, capture closes without submitting a partial prefix or oversized provider request. A turn is interpreted only after the original 800ms trailing-silence completion within that bound.

Subsecond complete-transcript availability and SUB1 diagnostics

Section titled “Subsecond complete-transcript availability and SUB1 diagnostics”

evaluateSubsecondCommand applies alyt.local-voice-ux-owner-requirement/3.0.0 with a strict less-than-1000ms final-spoken-sample to authorized-dispatch limit. This is distinct from the legacy evaluateWholeCommand / requirement2.0 2000ms limit; a passing legacy2000ms result does not establish SUB1 compliance. Missing final-sample, authorization-instant, load, init, queue, cache, or clock boundaries remain unknown. Abort/source/grant limits are unchanged, and no reducer grants physical acceptance or complete-product acceptance.

asrCompletedAt denotes validated complete-transcript availability, not model faithfulness or provider publication time. It requires externally verified inputs: completeTranscriptAvailableVerified: true plus completeTranscriptEvidenceVersion: "alyt.complete-transcript-availability/1.0.0". These are evaluation inputs, not proofs produced by the reducer. A separate completeTranscriptAvailability diagnostic version binds the PCM SHA256 to the original trace identities and preserves original identity/PCM binding while marking recognition faithfulness UNMEASURED.

The opt-in trace distinguishes service return from post-validation completion: ASR RETURNED is the service-return event, and only after transcript-schema parsing, cancellation checks, and all original audio-identity checks does the system emit COMPLETE_TRANSCRIPT_AVAILABLE / VALIDATED. Replay does not create a new availability event, and a later context/controller refusal can still fail the turn. The trace remains default-off, preserves original session/turn/source identities, and records no transcript text, audio samples, credentials, or raw speech. Existing byte, privacy, and replay guards remain in force.

The complete /transcribe response is used as the source for this diagnostic path; no partial-word API is required. The recorded timestamp is consumer availability at the router, not provider publication, acquisition time, or final spoken sample. Capture metadata remains SERVER_RECEIPT_ESTIMATE, so the event cannot establish acquisition-clock correlation or live SUB1 acceptance. Recognition quality, runtime lineage, and dispatch evidence remain separate and externally verified.

Last updated