Skip to main content
WSS
/
stt
/
websocket
Messages
X-API-Key
type:httpApiKey

API key passed in a header.

access_token
type:httpApiKey

A short-lived access token passed in a query param to make API requests from a client. This is particularly useful in the browser, where WebSockets do not support headers. See Authenticate client apps to generate an access token.

query
type:object
Send Audio Data
type:string

Send WebSocket binary messages containing raw audio data as specified by the encoding and sample_rate query parameters.

Audio Requirements:

  • Send audio in small chunks, e.g. 100 ms
  • Audio format must match the encoding and sample_rate parameters
Finalize Command
type:string

Send finalize as a text message when the user is done speaking to receive the transcript for any buffered audio.

Example: finalize
Close Command
type:string

Send close as a text message to flush remaining audio, close session, and receive a done acknowledgment

Example: close
Transcript Response
type:object

Transcript chunks.

You should send the finalize command after the user is done speaking to make the API emit these transcript chunks; although, the API may send transcript chunks even before you send the finalize command.

Flush Done Response
type:object

Acknowledgment for the finalize command

Done Response
type:object

Acknowledgment for the close command

Error Response
type:object

Error information for STT WebSocket connections.