-
Notifications
You must be signed in to change notification settings - Fork 1
Latency Budget
Zlatko Lakisic edited this page Aug 3, 2026
·
1 revision
Total target: under 15 seconds, ideally under 6.

| Stage | Budget | Notes |
|---|---|---|
| Wake word → capture start | ~50 ms | local, negligible |
| Utterance + VAD close | speech + ~0.7–1.2 s silence | tune audio.vad_silence_ms / COMSTAR_VAD_SILENCE_MS
|
| STT (Reach → Ada, or local fallback) | ~1–5 s | GPU on Ada preferred; Pi CPU tiny ~3–5 s |
| Orchestration | 2–10 s | dominated by MCP calls — where the budget goes |
| TTS (Ada or local Piper) | ~1 s | roughly realtime; first chunk can start earlier |
| Avatar render + playback | ~200 ms |
Every process emits structured JSON logs. Latency spans (via Span helper) on close:
| Span | Meaning |
|---|---|
wake_to_listen |
Wake → listening armed |
stt |
Transcription |
orchestration |
directAgent |
tts_first |
Time to first TTS chunk |
tts_total |
Full synthesis |
avatar_start |
Until kiosk speak.started
|
turn_total |
End-to-end turn |
Shared turn_id (ULID) threads through all spans for one turn.
make logs-export SINCE="1 hour ago" > /tmp/run.jsonl
python scripts/latency_report.py /tmp/run.jsonl
- Confirm orchestration dominates (if it doesn't, something else is wrong).
- Trim voice MCP set — remove slow tools.
- Prefer Ada STT over Pi
tiny. - Cache greetings.
- Clock skew between Mac and Pi must be < 1 s or span numbers are nonsense (
make doctor).
COMSTAR AI — Not a mystical AI. A tool you engineered — transparent, hackable, fast.
Home · Architecture · Admin Console · Runbook · Contracts
Apache-2.0 · Pre-alpha · Raspberry Pi 4 terminal + local AI server
COMSTAR AI
Start here
Product
Build & configure
Interfaces
- Contracts Overview
- Bridge ↔ Kiosk
- Bridge ↔ Audio
- CodeProject.AI
- AO Reach
- MCP Tools
- Attention State Machine
Features
- Speech (STT/TTS)
- Vision & Face Enrollment
- Directory Identity
- Wake Word
- MCP Topology
- Terminal Control
- Google Workspace
Decisions (ADRs)
- ADR Index
- 0001 Audio Routing
- 0002 Render Path
- 0003 Speech on Ada
- 0004 Terminal Control
- 0005 LDAP Identity
- 0006 House Presence
- 0007 Full-Duplex AEC
- 0008 TTS Engine
- 0009 Proactivity
- 0010 Text Channel
- 0011 Road VPN
- 0012 Admin Network
- 0013 AO mTLS
- 0014 Fallback Hotspot
Operate
Plan
Meta