Invited preview

Realtime transcription

Stream live PCM audio over WebSocket. Omi emits disposable low-latency drafts while the user speaks, then replaces them with an authoritative flagship record after the session closes.

WSSwss://rt.omi.health/v1/realtime

Existing Omi API key · realtime_enabled entitlement · v1-preview schema

Draft and record are deliberately separate

Live drafts are revisable display text and must never be persisted as the medical record. Only the event with tier: "record", authority: "authoritative", and is_final: true is documentation-eligible.

Connect and send audio

// Native clients: Authorization: Bearer $OMI_API_KEY
const ws = new WebSocket("wss://rt.omi.health/v1/realtime");

ws.addEventListener("open", () => {
  ws.send(JSON.stringify({
    type: "start",
    format: "pcm16",
    sample_rate: 16000,
    language: "en",
    vocabulary: ["Tinel", "Hepcludex"],
    speakers: "corrected"
  }));
});

// Send binary mono PCM16 frames at 16 kHz.
// When the session ends:
ws.send(JSON.stringify({type: "stop"}));

Native clients should send the bearer token as an Authorization header. Browser WebSocket APIs cannot set arbitrary headers; Omi’s private demo may use an access ticket or query credential. Do not put a long-lived API key in public browser code.

Event lifecycle

{"schema":"v1-preview","type":"hello","session_limit_s":1800}

{"schema":"v1-preview","type":"partial","tier":"draft",
 "authority":"draft","text":"the patient…","is_final":false,"revision":4}

{"schema":"v1-preview","type":"turn_end",
 "utterance_id":0,"turns":"v0-preview","is_final":false}

{"schema":"v1-preview","type":"partial","event":"draft_correction",
 "tier":"display","text":"The patient reports chest pain.","is_final":false}

{"schema":"v1-preview","type":"final","tier":"record",
 "authority":"authoritative","official_record":true,
 "record_mode":"single_call","replaces_drafts":true,
 "text":"The patient reports chest pain.","is_final":true,"words":[...]}
EventMeaningClient behavior
helloNegotiated preview schema and limits.Store the session ID and advertised cap.
partial · draftFast, revisable draft text.Render it; replace revisions; never persist it as the record.
turn_endVAD-backed utterance boundary.Use it for UI/agent timing; it is not a speculative candidate/cancel API.
partial · draft_correctionOptional rolling display correction.Replace display text only; it is not final.
statusThe official record is being produced.Keep the UI open or notify the user that sealing is in progress.
final · recordAuthoritative record.Replace drafts and persist this record.
capacityNo session slot available.Honor retry_after, reconnect with jitter.
session_limit_reached30-minute cap reached cleanly.Wait for final/end, then reconnect to continue.
errorExplicit terminal or tier failure.Never promote a draft when final record creation fails.
endTerminal session event.No later event is valid.

Audio and session limits

  • Binary mono PCM16 frames at 16 kHz.
  • Preview session limit: 30 minutes; longer sessions are available on request.
  • Realtime is an invited preview with a strict concurrency cap. Additional sessions fail cleanly with retry guidance.
  • Silence is skipped before inference; dead air must not produce transcript text.
  • Vocabulary applies to corrected display text and the record, not the disposable draft.

Record timing

The official record is a single lossless-FLAC submission through the normal production batch route. Preview guidance is approximately one minute of record processing per three to four minutes of session audio. The measured 30-minute proof completed in 586 seconds. This is guidance, not a latency SLA.