Repository navigation
Open
Labels
Description
airc-queue card
Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).
{
"kind": "airc-queue-card-v1",
"id": "#652",
"owner": "claude-tab-2",
"status": "claimed",
"evidence": "Adopted existing GitHub issue into airc queue.",
"next_action": "Triage, claim, or close this adopted backlog card."
}Close this issue when the work is done (status=merged/abandoned).
Original issue body
Pre-adoption body
Summary
Personas need to see, hear, and speak at human-conversational speed. This is NOT about adding modalities (see #649, #650) — it's about making them FAST enough for real-time interaction.
Latency Budgets
| Sense | Target | Current | Gap |
|---|---|---|---|
| Vision (scene understanding) | <100ms | Bridge via VisionDescriptionService (slow) | Need native or distilled model |
| Audio input (hearing) | <50ms | STT bridge (200-500ms) | Need streaming encoder |
| Audio output (speech) | <150ms first-byte | TTS bridge (500ms+) | Need streaming vocoder |
| Touch/interaction events | <16ms | Already fast (DOM events) | OK |
Architecture Requirements
- ALL processing off main thread (AudioWorklet, Web Workers, Rust workers)
- Streaming — don't wait for complete input. Process chunks as they arrive
- Transferable buffers — zero-copy between threads
- Adaptive quality — degrade gracefully (lower resolution, skip frames) rather than block
- Local inference only — can't hit an API for real-time sensory processing
Vision Pipeline (target: <100ms)
- Frame capture (requestAnimationFrame or Intersection Observer) → <1ms
- Resize/crop to model input size → <5ms (Web Worker)
- Run distilled vision model (Qwen3.5-0.8B or MobileCLIP) → <80ms (Rust worker)
- Inject description into persona context → <5ms
Audio Pipeline (target: <50ms input, <150ms output)
Input:
- AudioWorklet captures PCM chunks → 0ms (runs on audio thread)
- Transfer to Rust worker via SharedArrayBuffer → <1ms
- Streaming Whisper encoder → <40ms per chunk
- Text injected to persona → <5ms
Output:
- LLM generates speech tokens → streaming
- Vocoder decodes to PCM → <100ms first chunk
- AudioWorklet plays back → <1ms queue
Key Principle
This is a hard real-time system. The render loop is sacred. Miss a frame budget and the experience breaks. This is where Rust workers earn their keep — JS cannot meet these latency targets.
Related
- Native multimodal pipeline — direct audio/vision for capable models, bridge for text-only #582 (Native multimodal pipeline — the capability)
- Factory recipe: bolt-on vision encoder (LLaVA-style) #649 (Vision encoder recipe — the training)
- Factory recipe: audio encoder + speech head (Whisper-style) #650 (Audio encoder recipe — the training)
- Integrate Qwen3.5-0.8B as local VisionDescriptionService — real-time scene understanding at 1GB #480 (Qwen3.5-0.8B vision)
- This issue is about INFERENCE SPEED, not training
Activity
docs(gap): inference design goal — multi-persona live chat at low lat…