Analysisv1
Stream Analysis
For live calls and voice agents, stream audio to Voxtar over a WebSocket and receive incremental biomarker readings as the patient speaks — instead of uploading a finished file. Ideal for turning an in-progress triage or monitoring call into a screening with no extra step.
Connecting
Open a socket to the streaming endpoint and authenticate in the first frame. Send raw PCM (16kHz, mono) or Opus frames; receive JSON events.
wss://api.voxtar.hallelx2.com/v1/analyze/stream
const ws = new WebSocket("wss://api.voxtar.hallelx2.com/v1/analyze/stream",);ws.onopen = () => {ws.send(JSON.stringify({type: "start",api_key: process.env.VOXTAR_API_KEY,patient_id: "pt_8kQ2v9",encoding: "pcm_s16le",sample_rate: 16000,panels: ["respiratory", "neurological"],}));};// then stream audio chunksmic.on("data", (chunk) => ws.send(chunk));
Events
The server emits partial readings every ~1s and a final complete event with the same shape as POST /analyze when the stream closes.
{ "type": "partial", "elapsed_ms": 2000,"panels": { "respiratory": { "score": 0.55, "drift": "watch" } } }{ "type": "complete", "id": "an_5Tz7Lm","flags": [{ "code": "respiratory_drift", "severity": "review" }] }
Send { "type": "stop" } to finalize, or just close the socket. The completed analysis is persisted and retrievable via GET /analyses/{id}.