Speech To Text over WebSockets

Speech to text over WebSocket

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, Cohere.

Connection flow:

  1. Open WebSocket with query parameters specifying engine, input format, and language.
  2. Send binary audio frames (mp3, wav, linear16, or linear32 format, per input_format).
  3. Receive JSON transcript frames with transcript, is_final, and confidence fields.
  4. Close connection when done.
get/speech-to-text/transcription

Query parameters

transcription_engine'Azure' | 'Deepgram' | 'Google' | 'Telnyx' | 'xAI' | 'Speechmatics' | 'Soniox' | 'Parakeet' | 'Humain' | 'Reson8' | 'Cohere' required

The transcription engine to use for processing the audio stream.

input_format'mp3' | 'wav' | 'linear16' | 'linear32' required

The format of input audio stream.

sample_rateinteger

Audio sample rate in Hz. Required when input_format is a raw encoding (linear16, linear32) — those formats carry no header metadata. Ignored for container formats (mp3, wav), which self-describe their rate.

languagestring

The language spoken in the audio stream. For cohere/ar-stt, this must be ar or en — unlike other engines, Cohere does not auto-detect the language, and rejects unsupported values including auto; omitting it defaults to ar.

interim_resultsboolean

Whether to receive interim transcription results.

'fast'
OR
'deepgram/nova-2' | 'deepgram/nova-3'
OR
'latest_long' | 'latest_short' | 'command_and_search' | 'phone_call' | 'video' | 'default' | 'medical_conversation' | 'medical_dictation'
OR
'openai/whisper-tiny' | 'openai/whisper-large-v3-turbo'
OR
'xai/grok-stt'
OR
'speechmatics/standard'
OR
'soniox/stt-rt-v4'
OR
'nvidia/parakeet-v3' | 'omi-health/omi-med-stt-v1'
OR
'humain/realtime'
OR
'reson8/turns'
OR
'cohere/ar-stt'

The specific model to use within the selected transcription engine.

endpointinginteger

Silence duration (in milliseconds) that triggers end-of-speech detection. When set, the engine uses this value to determine when a speaker has stopped talking. Supported by xAI, Deepgram, Google, Speechmatics, and Soniox. Soniox accepts values between 500 and 3000. Other engines may not support this parameter.

redactstring

Enable redaction of sensitive information (e.g., PCI data, SSN) from transcription results. Supported values depend on the transcription engine.

keytermstring

A key term to boost in the transcription. The engine will be more likely to recognize this term. Can be specified multiple times for multiple terms.

keywordsstring

Comma-separated list of keywords to boost in the transcription. The engine will prioritize recognition of these words.

Response

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

Changes

Changed in 7 of the 99 revisions of this API.39

    • ○

      added the enum value omi-health/omi-med-stt-v1 to the property oneOf[parakeet_models]/ of the query request parameter model

      request-parameter-property-enum-value-added

  • a6a61a29ecdd14See the full diff
    • ▲

      the response property //// became nullable for the status

      response-property-became-nullable

    • ○

      added the new optional query request parameter sample_rate

      new-optional-request-parameter

    • ○

      added the new enum value Cohere to the query request parameter transcription_engine

      request-parameter-enum-value-added

    • ○

      added the new enum value linear16 to the query request parameter input_format

      request-parameter-enum-value-added

    • ○

      added the new enum value linear32 to the query request parameter input_format

      request-parameter-enum-value-added

    This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new enum value Reson8 to the query request parameter transcription_engine

      request-parameter-enum-value-added

    • ○

      added the new enum value Humain to the query request parameter transcription_engine

      request-parameter-enum-value-added

  • afc3349ad4f111See the full diff
    • ▲

      removed the enum value parakeet/tdt-0.6b-v3 from the property oneOf[parakeet_models]/ of the query request parameter model

      request-parameter-property-enum-value-removed

    • ○

      added the enum value nvidia/parakeet-v3 to the property oneOf[parakeet_models]/ of the query request parameter model

      request-parameter-property-enum-value-added

    • ○

      added the new enum value Parakeet to the query request parameter transcription_engine

      request-parameter-enum-value-added

    • ▲

      removed the enum value Parakeet from the query request parameter transcription_engine

      request-parameter-enum-value-removed

    This revision also has 111 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 99 revisions, 1 has no diff computed.