/ws/transcribe, send { "type": "AUDIO", "audioData": "<base64 pcm>" } chunks, then { "type": "EVENT", "event": "AUDIO_END" }. Wait for inbound transcript.transcript === "EOF", close the socket, then call End Dictation session. Do not send ambient RU9G.
This cookbook assumes you already have your Partner ID, authentication tokens, and an active Dictation
transcription_session_id.- TypeScript
- Python
Common mistakes
- Send
{ "type": "AUDIO", "data": "RU9G" }on Dictation. That marker is ambient-only. - Close the socket or call REST end before you receive inbound
EOF. - Open
/ws/transcribeagain before the session returns toREADYorIDLE.