---
title: "Speech to text over WebSocket"
method: GET
path: "/speech-to-text/transcription"
tags: ["Speech To Text over WebSockets"]
---

# Speech to text over WebSocket

`GET /speech-to-text/transcription`

Open a WebSocket connection to stream audio and receive transcriptions in real-time. Authentication is provided via the standard `Authorization: Bearer <API_KEY>` header.

Supported engines: `Azure`, `Deepgram`, `Google`, `Telnyx`, `xAI`, `Speechmatics`, `Soniox`, `Parakeet`, `Humain`, `Reson8`.

**Connection flow:**
1. Open WebSocket with query parameters specifying engine, input format, and language.
2. Send binary audio frames (mp3/wav format).
3. Receive JSON transcript frames with `transcript`, `is_final`, and `confidence` fields.
4. Close connection when done.

## Query parameters

- `transcription_engine` 'Azure' | 'Deepgram' | 'Google' | 'Telnyx' | 'xAI' | 'Speechmatics' | 'Soniox' | 'Parakeet' | 'Humain' | 'Reson8', required
- `input_format` 'mp3' | 'wav', required
- `language` string
- `interim_results` boolean
- `model` union
  - 'fast'
  - 'deepgram/nova-2' | 'deepgram/nova-3'
  - 'latest_long' | 'latest_short' | 'command_and_search' | 'phone_call' | 'video' | 'default' | 'medical_conversation' | 'medical_dictation'
  - 'openai/whisper-tiny' | 'openai/whisper-large-v3-turbo'
  - 'xai/grok-stt'
  - 'speechmatics/standard'
  - 'soniox/stt-rt-v4'
  - 'nvidia/parakeet-v3'
  - 'humain/realtime'
  - 'reson8/turns'
- `endpointing` integer
- `redact` string
- `keyterm` string
- `keywords` string

## Response `200`

WebSocket upgrade successful — this response is not returned directly. See 101 for frame documentation.

## Other responses

- `101` — WebSocket connection established. Communication proceeds via binary audio frames (client) and JSON transcript frames (server). **Client → Server:** Binary audio data (mp3/wav). **Server → Client:** See `TranscriptFrame` and `SttErrorFrame` schemas.
- `400` — Invalid parameters — engine not supported or missing required fields.
- `401` — Authentication failed — missing or invalid Authorization header.
- `422` — Unprocessable entity. The request was well-formed but could not be processed due to semantic errors. This includes validation errors, invalid parameter values and business logic violations.

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
