Skip to Content
Vatis TechAPI docs
Real-time transcription

Messages

Every JSON message of a session: the ones you send and the ones you receive.

Audio goes in binary frames; everything else is JSON text. Ignore message types and fields you do not know: new ones may be added.

Messages you send

MessageDoes
a binary frameRaw audio in the session's encoding and sample_rate (with multichannel, both channels interleaved), at most 1 s of it.
{"type": "commit"}Ends the current segment now, in every mode (with multichannel, on both channels); its final follows. With nothing said since the last final, that final has an empty text. With manual, a commit does not restart recognition: a word still being said at that moment is not in the commit's final, it comes whole at the start of the next final.
{"type": "end"}No more audio: the last final messages come, then session.ended, then the server closes with 1000. After end, only ping is answered.
{"type": "ping"}Answered with {"type": "pong"}.
{"type": "vocabulary", "entries": [...]}The session's own vocabulary entries, at most 250, in place of those of the message before (an empty list removes them); answered with vocabulary.applied (The session's own list). A bad entry: error invalid_parameter, close 1008.
any other textNot JSON, or another type: error invalid_parameter (param type), close 1008.

Any message or audio resets the idle timeout (15 s).

Messages you receive

typeWhenFields
session.startedfirst, once the session is readysession_id (sess_ and 32 hex digits), model_id, config (every parameter as applied); client_reference when you sent one.
partialwhen the text of the open segment changessegment_id (the one its final will have), text (the segment so far, replaced by the next partial or by its final), start (the segment's), end (the end of the audio it covers). With diarize=true: speaker and words [{text, start, end, speaker}]; else with timestamps=true: words [{text, start, end}]. With multichannel=true: also speaker (channel_0, channel_1) and channel (0, 1), on it and on its words.
finala segment endedsegment_id, text, start, end, speaker (always there; null without diarize or multichannel), and with timestamps=true words [{text, start, end, confidence, speaker}]. With multichannel=true also channel, on it and on its words. With commit=turn also end_reason (turn, pause, commit, end: What ended the segment). Never revised; with speaker_updates=true its speakers come again in final.speakers.
final.speakersafter each final, with speaker_updates=truesegment_id (its final's), speaker (the segment's), and with timestamps=true words [{text, start, end, confidence, speaker}]: the final's words again, each with its speaker. Speakers only, never text or times (The text first, its speakers after).
vocabulary.appliedafter each vocabulary message, once its entries are in effectentries (the session's own entries now), total (with the saved vocabulary's; an entry in both counts once). In the order of the messages (What you get back).
session.endedafter your endsession_id, duration_s (the audio received, 3 decimals; with multichannel, the length of the call, once).
pongafter a ping
errorthe session is refused or failscode, message, and param for invalid_parameter; then the server closes, with the message (up to 120 characters) as the close reason (Errors in a session).
  • Times are seconds from the start of the session's audio.
  • A partial's text is its words joined with spaces. Partials have no confidence: it comes with the final.
  • While a final waits for speaker separation, the partials behind it collapse to the newest one.

On this page