Reference

WebSocket events

Every socket and every frame, with its fields and an example.

accountEvents /v1/events

The owner's dashboard: `events.ready` once the socket is listening, then `lists.changed` whenever a list of transcriptions or broadcasts of any principal the caller may act for is out of date — a recording changed state, a transcription settled, a title was written, or the owner changed something from another device. It says that, not what: re-read `GET /v1/transcriptions` and `GET /v1/broadcasts`. It replaces polling those lists. `speakers.changed` (with `speakerId`) says a speaker's cloned voice moved: cloning started, the voice became ready, or it failed; re-read `GET /v1/speakers/{id}` or `GET /v1/speakers` instead of polling them while a voice is `training`. A user may hold a few of these at once (5 by default): opening one more closes their oldest with code 4001. One is closed with code 4002 after a day. After either, do not reconnect at once — a client that does takes its place straight back; reconnect when the user next uses that screen.

  • events.ready
  • lists.changed
  • speakers.changed

broadcastEvents /v1/broadcasts/{id}/events

What a screen waiting on a broadcast needs: when a live transcription starts (`transcription.started`: it is live), when it ends (`transcription.ended`), a file job's progress (`job.progress`), and a pulled stream's state (`stream.ingest`). Each frame's `transcriptionId` is the transcription: on a broadcast's socket, the live transcription feeding it. The socket may close with code 4004 when the client falls behind (it reads frames more slowly than they are sent): reconnect. On open the socket sends the current `transcription.started` when a transcription is live; nothing else is sent again, so a `transcription.ended`, `job.progress` or `stream.ingest` sent meanwhile is missed: after reconnecting, read the broadcast (`GET /v1/broadcasts/{id}`, as its owner) or the transcription you were following (`GET /v1/transcriptions/{id}`) once.

  • transcription.started
  • transcription.ended
  • job.progress
  • stream.ingest

realtimeSession /v1/realtime/sessions/{token}/socket

Connect to the `streamUrl` a realtime session returned (treat it as opaque).

  • session.loading A heartbeat while the machine gets ready (`stage`: `download`, then
  • session.queued Every transcription machine is taken: the realtime session waits in
  • session.ready The realtime session is ready: send audio from now on.
  • session.heartbeat Sent every `heartbeatS` seconds on a socket whose `session.ready`
  • transcript.committed One final segment, with word timings, numbered by `seq` (0, 1, 2…,
  • transcript.draft The live tail: the words heard since the last commit, still
  • transcript.words Word timings for the live tail as they firm up (`events.words`);
  • transcript.amended An already-delivered committed segment was rewritten by the engine
  • transcript.latency A delivered segment's latency, measured again now that the engine's
  • transcript.speaker A tentative speaker label on a delivered segment was settled:
  • transcript.speakerGender A speaker's gender, as the pitch band heard it, once it settles
  • transcript.speakerIdentified A diarized speaker turned out to be somebody the caller saved
  • transcript.speakerNumbers The display number and name of every speaker so far, in full:
  • transcript.sentence Full-replacement upsert of one sentence, keyed by `sentenceId`.
  • transcript.translated
  • transcript.voice A spoken rendering of one definitive sentence (`SessionOptions::voice`).
  • transcript.voiceStatus Why a language's voice is not heard yet — or will not be heard at
  • transcript.languageStatus A stream pinned to a spoken language: whether the speech is that
  • transcript.retracted Committed rows taken back: the speech there was another language
  • transcript.held Text held back (`held`): from `fromMediaS` the speech may be
  • transcript.progress
  • stream.pull `input.kind = "stream"`: how the engine's pull of the stream is
  • source.progress `input.prepare`: the source on its way in. `phase` "fetching"
  • source.prepared `input.prepare`: the source is stored and ready to transcribe.
  • session.done
  • error

subscribe /v1/transcriptions/{id}/subscribe

Follow a recording: first frame `subscribe.ready {lastSeq}`, then `GET /v1/transcriptions/{id}/transcript` and discard buffered frames with `seq <= lastSeq`. VocalStack picks the voice that speaks each language (the host's `voiceCloning` says whether cloned voices are used); every listener on a language hears the same reading, synthesised once. Send `{"type":"subscribe.update","lang":"ja"}` to switch language, `{"type":"subscribe.update","audio":true}` to receive live Opus. The socket may close with code 4004 when the client falls behind (it reads frames more slowly than they are sent): reconnect and resume from the last `seq` you applied, by reading `GET /v1/transcriptions/{id}/transcript` with `after=` that value and discarding frames with `seq` at or below its `lastSeq`.

  • session.loading A heartbeat while the machine gets ready (`stage`: `download`, then
  • session.queued Every transcription machine is taken: the realtime session waits in
  • session.ready The realtime session is ready: send audio from now on.
  • session.heartbeat Sent every `heartbeatS` seconds on a socket whose `session.ready`
  • transcript.committed One final segment, with word timings, numbered by `seq` (0, 1, 2…,
  • transcript.draft The live tail: the words heard since the last commit, still
  • transcript.words Word timings for the live tail as they firm up (`events.words`);
  • transcript.amended An already-delivered committed segment was rewritten by the engine
  • transcript.latency A delivered segment's latency, measured again now that the engine's
  • transcript.speaker A tentative speaker label on a delivered segment was settled:
  • transcript.speakerGender A speaker's gender, as the pitch band heard it, once it settles
  • transcript.speakerIdentified A diarized speaker turned out to be somebody the caller saved
  • transcript.speakerNumbers The display number and name of every speaker so far, in full:
  • transcript.sentence Full-replacement upsert of one sentence, keyed by `sentenceId`.
  • transcript.translated
  • transcript.voice A spoken rendering of one definitive sentence (`SessionOptions::voice`).
  • transcript.voiceStatus Why a language's voice is not heard yet — or will not be heard at
  • transcript.languageStatus A stream pinned to a spoken language: whether the speech is that
  • transcript.retracted Committed rows taken back: the speech there was another language
  • transcript.held Text held back (`held`): from `fromMediaS` the speech may be
  • transcript.progress
  • stream.pull `input.kind = "stream"`: how the engine's pull of the stream is
  • source.progress `input.prepare`: the source on its way in. `phase` "fetching"
  • source.prepared `input.prepare`: the source is stored and ready to transcribe.
  • session.done
  • error
  • subscribe.ready First frame after the upgrade: where the live sequence stands, so
  • recording.state Recording state changed (LIVE ⇄ PAUSED → ENDED → FINALIZED).
  • recording.settings Capture settings changed mid-recording (mode, language, labels).
  • recording.silence The silence watchdog will pause the recording soon.
  • recording.expiring The max-duration cutoff is near.
  • transcript.corrected A human correction was applied — distinct from an engine amend.
  • transcript.speakerGender A speaker's gender, once their voice has been judged
  • transcript.speakerIdentified A speaker and the saved voice they turn out to be.
  • transcript.speakerNamed A per-recording speaker label.
  • transcript.speakerNumbers The display number and name of every speaker in the recording, in
  • transcription.started Broadcast or transcription topic: a live transcription started (it
  • job.progress A file / URL transcription job moved (both topics: the recording's
  • speaker.voice A speaker's cloned voice moved: it is being made (`training`, with
  • stream.ingest A stream source's server-side publisher moved (both topics): what
  • transcription.ended Broadcast or transcription topic: the live transcription ended (on a
  • audience Admin subscribers: the audience aggregate, every few seconds.
  • subscribe.gap The frame sequence jumped; the client should re-snapshot from its cursor.

transcriptionEvents /v1/transcriptions/{id}/events

What a screen waiting on a transcription needs: when a live transcription starts (`transcription.started`: it is live), when it ends (`transcription.ended`), a file job's progress (`job.progress`), and a pulled stream's state (`stream.ingest`). Each frame's `transcriptionId` is the transcription. The socket may close with code 4004 when the client falls behind (it reads frames more slowly than they are sent): reconnect. On open the socket sends the current `transcription.started` when a transcription is live; nothing else is sent again, so a `transcription.ended`, `job.progress` or `stream.ingest` sent meanwhile is missed: after reconnecting, read the transcription (`GET /v1/transcriptions/{id}`) once.

  • transcription.started
  • transcription.ended
  • job.progress
  • stream.ingest