Latency
Perceived latency is not one HTTP round-trip. It is the full pipeline:
endpointing → upload → model TTFT / first PCM → player queueing
Typical turn:
- User speaks → Session listens with volume / hybrid VAD
- Live chunks hit ASR;
asr_partialkeeps updating silenceTimeoutMsends the turn →user_audio_end- LLM stream / Audio LLM returns text or PCM
- First packet enqueued →
assistant_audio_start
Practical levers
Section titled “Practical levers”- Prefer streaming ASR with partials so captions appear while the user speaks.
- After noise testing, tune
silenceTimeoutMsto roughly 350–600 ms (defaults are conservative — see core). - Implement
LLMProvider.stream(), or Audio LLMonTranscriptDelta/onAudioChunk, instead of waiting for a full reply. - Reuse connections and playback; cap reply length and
maxTokens. - Use stricter
interruptionDetectionduring playback so echo does not false-trigger, without delaying real barge-in.
How to measure
Section titled “How to measure”| Interval | Events | Meaning |
|---|---|---|
| Endpoint → first audio | user_audio_end → assistant_audio_start |
Perceived first-audio latency (primary KPI) |
| Endpoint → first text | user_audio_end → first assistant_text_delta |
Text TTFT |
| Live captions | First asr_partial |
Input-side feel |
Sample on target devices, speaker volume, and real noise — not only a quiet lab.
Compatibility path
Section titled “Compatibility path”Rolling partials (batch ASR) re-upload accumulated audio — fine for demos. Prefer native WebSocket streaming ASR (Deepgram / ElevenLabs) in production.
See TurnDetectionConfig, policy, and the events guide.