Stream Audio To Dictation Session
Opens a WebSocket to stream audio for real-time transcription. Browser clients authenticate with the Sec-WebSocket-Protocol header; non-browser clients send sdp_suki_token and transcription_session_id as HTTP headers on the upgrade request.
Inbound transcript messages
The server sends JSON text frames that includetranscript, is_final, and transcript_id. Use is_final to identify whether the
transcript is a partial result or a final result. After the audio stream ends, the server sends { "transcript": { "transcript": "EOF" } } and then closes the WebSocket connection.
Refer to Dictation streaming for frame examples, words and speaker IDs on finals, and client-side filtering rules.
Authentication
Authentication is applied during the WebSocket handshake. The method depends on your client type. UseSec-WebSocket-Protocol header for browser clients, and sdp_suki_token and transcription_session_id headers for non-browser clients.
Browser clients
If you are connecting from a browser, you must use theSec-WebSocket-Protocol header during the WebSocket handshake.
The header must specify the SukiAmbientAuth protocol, followed by the token and the transcription session ID in the following format.
Non-browser clients
If you are connecting from a non-browser client, such as a mobile or server-side application, you must provide the token and session ID as separate HTTP headers in the initial WebSocket upgrade request.sdp_suki_token: Session token from login.sdp_provider_id: Provider identifier. Optional for standard partners; Required for Single Auth Token authentication.transcription_session_id: The ID for the current session.
Code examples
- Python
- TypeScript
Authorizations
Suki access token for the authenticated provider. Obtain this by calling Login or Register with a valid partner_token. Pass the suki_token value from the JSON response as the sdp_suki_token header on REST requests and non-browser WebSocket upgrades. Browser WebSocket clients pass the token in Sec-WebSocket-Protocol instead. Tokens expire after one hour; call Login again to refresh.
Headers
Required FOR BROWSER CLIENTS ONLY. Sent during WebSocket handshake. Browsers must use the same subprotocol the grpc-wsproxy maps to Authorization: 'SukiAmbientAuth,<sdp_suki_token>,<transcription_session_id>' (comma-separated; token second, transcription session id third). Other names (e.g. SukiTranscriptionAuth) are not mapped and typically yield 401.
Required for non-browser clients only. UUID from Create Transcription Session.
Optional - Stable identifier for the active provider. Omit for standard partners whose partner_token identifies the user. Required for Bearer partners and Single Auth Token authentication where multiple providers share one partner_token. Use the same provider_id you sent on Login or Register.
"provider-123"
Response
Switching Protocols - Indicates successful WebSocket handshake.
The response is of type string.