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.
wss://rt.omi.health/v1/realtimeExisting Omi API key · realtime_enabled entitlement · v1-preview schema
Draft and record are deliberately separate
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":[...]}| Event | Meaning | Client behavior |
|---|---|---|
hello | Negotiated preview schema and limits. | Store the session ID and advertised cap. |
partial · draft | Fast, revisable draft text. | Render it; replace revisions; never persist it as the record. |
turn_end | VAD-backed utterance boundary. | Use it for UI/agent timing; it is not a speculative candidate/cancel API. |
partial · draft_correction | Optional rolling display correction. | Replace display text only; it is not final. |
status | The official record is being produced. | Keep the UI open or notify the user that sealing is in progress. |
final · record | Authoritative record. | Replace drafts and persist this record. |
capacity | No session slot available. | Honor retry_after, reconnect with jitter. |
session_limit_reached | 30-minute cap reached cleanly. | Wait for final/end, then reconnect to continue. |
error | Explicit terminal or tier failure. | Never promote a draft when final record creation fails. |
end | Terminal 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.