Skip to main content
GPT Realtime Whisper converts streaming speech into text. Use it for live captions and dictation. Your application decides where each turn ends and commits the audio.

WSS

wss://api.modellix.ai/api/v1/live/openai/gpt-realtime-whisper
For authentication, handshake errors, and close codes shared by all Live models, see the Live Overview.

Quick Start

Prepare a short mono, 16-bit PCM WAV file at 24 kHz and set MODELLIX_API_KEY. Save the following code as whisper.py and run python whisper.py speech.wav. The script commits the whole file as one turn.
Python

Client Messages

session.update

Send session.update after session.created. The following fields belong inside session.
string
required
Allowed value: transcription.
object
Use {"type": "audio/pcm", "rate": 24000}.
string
required
Use gpt-realtime-whisper. The URL selects the model, and Modellix replaces this value with the upstream model identifier.
string
The input language as an ISO 639-1 code, such as en.
string
Allowed values: minimal, low, medium, high, xhigh. Lower values give earlier partial text; higher values usually improve accuracy.
null
required
Must be null. This model does not support voice activity detection, so your application detects the end of speech and sends input_audio_buffer.commit.
This model does not support audio.input.transcription.prompt.

Audio Input

event
Appends base64-encoded 24 kHz PCM16 mono audio in the audio field. Chunks of 9,600 bytes hold 200 ms of audio.
event
Ends the current audio turn and starts its final transcription.

Server Messages

Server events are forwarded unchanged. Match transcript events to their turn by item_id.
event
The first event on a connection. Wait for it before sending session.update.
event
The turn was committed. item_id identifies it.
event
Newly available text in delta, with item_id and content_index.
event
The final text in transcript, with item_id and content_index. usage reports type: "duration" and seconds.
event
Transcription failed for the item in item_id.
event
An upstream error. error.message describes it.

Billing

Each completed turn produces one request record, based on usage.seconds from its completed event. Seconds are charged from the per-minute price without rounding up to a whole minute. Unit prices and invoices follow the console.
  • Silence counts. Silence in a committed turn is part of the reported audio seconds.
  • Uncommitted audio. If you disconnect before committing, Modellix commits the buffered audio once and waits up to 2 seconds for the result. If no usage arrives in that time, there is no charge for that audio.
  • Disconnect after commit. A committed turn is billed if its result arrives within the same 2-second window. To keep the transcript as well, wait for completed before closing.
You can inspect usage and the charged amount in the console’s Live request records.

Sessions and Limits

  • This model is available only through its own Live endpoint. Other Live models cannot use it for attached transcription.
  • WebSocket only. WebRTC and other upstream HTTP endpoints are not available through Modellix.
  • Modellix closes any connection at its maximum connection duration with code 4408.
See the OpenAI model page for model details.