Open one WebSocket, stream microphone audio, and receive live transcription — then a structured clinical note, shaped by your own prompt and written in the language of the consult.
Three moving parts, one WebSocket.
Send raw microphone frames (WebM/Opus or PCM). No uploads, no files — it's live.
Real-time speech-to-text returns interim & final transcripts within a second of speech.
On stop, your prompt + the transcript become a clinical note, streamed back token by token.
Everything the consult needs, nothing it doesn't.
Low-latency streaming speech-to-text with smart formatting, built for clinical dictation.
Transcribe in 10+ languages or multi for code-switching. Notes come back in the spoken language.
You supply the template as free text — SOAP, HEAP, discharge summary, anything.
Transcript and note both stream live, so the UI feels instant.
Email + password → a short-lived signed token. Secrets never touch the client.
1 credit = 20 minutes, charged per session with a full usage log.
Log in, open the socket, stream the mic. Full reference in the docs.
const API = "https://api.vetflash.io"; // 1 · log in → sessionToken const { sessionToken } = await fetch(`${API}/v3/auth/session`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ email, password }), }).then(r => r.json()); // 2 · open the socket, send your prompt, stream audio const ws = new WebSocket(`${API.replace(/^http/,"ws")}/v3/scribe/stream?sessionToken=${sessionToken}`); ws.onopen = async () => { ws.send(JSON.stringify({ type: "start", prompt: "Write a SOAP note.", language: "en-GB" })); const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); const rec = new MediaRecorder(stream, { mimeType: "audio/webm" }); rec.ondataavailable = e => ws.send(e.data); rec.start(250); }; // 3 · render live transcript + streamed note ws.onmessage = ev => { const m = JSON.parse(ev.data); if (m.type === "transcript") showTranscript(m.text, m.isFinal); if (m.type === "note") appendNote(m.delta ?? m.text); };