Skip to content

Contracts Bridge Audio

Zlatko Lakisic edited this page Aug 3, 2026 · 1 revision

Contracts — Bridge ↔ Audio

Transport: ws://127.0.0.1:8778
Envelope: same as Bridge ↔ Kiosk
Status: SPEC

Bridge audio protocol


Audio → Bridge

type data meaning
wake {score, model} Wake word fired above threshold.
vad.speech_start {} Speech onset detected.
vad.speech_end {durationMs} vad_silence_ms of silence elapsed.
audio.begin {turn_id, sampleRate, encoding} Precedes the binary stream.
audio.chunk binary frame 16 kHz mono PCM s16le, ~320 ms per frame.
audio.end {frames, totalMs} Stream complete.
level {rms} ~10 Hz mic level for the UI meter.
error {code, message} Device lost, model load failure.

Bridge → Audio

type data meaning
listen.start {turn_id, maxMs} Begin streaming captured audio.
listen.stop {} Stop capture (timeout, cancel, barge-in).
wake.enable {enabled} Disabled during playback in half-duplex mode.
play {audioUrl, turn_id} Unused in Phase 1 — reserved; kiosk is the sink (ADR 0001).
mute {muted} Software mute. Reflected in mic_status MCP tool.

Capture notes

  • Rolling in-memory ring buffer (~3 s) — never written to disk by default.
  • Include ~500 ms of pre-roll before the wake word in the captured utterance.
  • Hard stop at max_utterance_seconds.
  • STT is batch after VAD end, not streaming into the model mid-utterance (product path).

Live accuracy path:

mic → comstar-audio (VAD) → bridge PCM → Reach SpeechClient or HttpSttClient → transcript

Audio capture pipeline


Related pages

Clone this wiki locally