Skip to main content

Overview

Soniox is a speech provider. Bifrost supports its REST workloads and its real-time transcription:
  • Speech-to-Text (async) - One transcription call uploads the audio, creates a Soniox job, polls it to completion, reads the transcript, and then tries to delete the job and the uploaded file in the background
  • Real-time Speech-to-Text - A Soniox WebSocket stream is translated to OpenAI Realtime transcription events on /v1/realtime?intent=transcription
  • Text-to-Speech - Soniox streams audio as the body of POST /tts; Bifrost returns it whole, forwards the chunks, or serves incremental WebSocket sessions
  • Model listing - Soniox lists speech-to-text and text-to-speech models on separate endpoints; Bifrost merges them
  • Authentication - Authorization: Bearer <key> on every call

Supported Operations

Unsupported Operations (❌): Chat, Responses, Text Completions, Embeddings, Images, Files, Batch, and streaming transcription over HTTP return UnsupportedOperationError. Real-time transcription is served on /v1/realtime only.

Setup & Configuration

  1. Navigate to Models > Model Providers. Look for Soniox under Configured Providers. If it is missing, click on Add New Provider and select Soniox.
  2. Click Add Key or edit an existing key.
  3. Set a name for your key.
  4. Paste your API key directly or use an environment variable (for example, env.SONIOX_API_KEY).
  5. Set Allowed Models to All Models (default) or the specific model allowlist you want this key to serve.
  6. Save the provider configuration.

1. Speech (Text-to-Speech)

Soniox returns raw audio as a chunked response body. Bifrost returns the full body for a unary request, and forwards each chunk as a speech.audio.delta event for a streaming request, followed by speech.audio.done. For text that arrives in pieces, open a WebSocket session on /v1/audio/speech/stream.

Parameter Mapping


2. Transcription (Speech-to-Text)

Soniox transcribes asynchronously. A single Bifrost call uploads the file, creates the job, polls it until it completes (for at most the provider’s request timeout), and reads the transcript. The job and the file are then deleted in the background, and a failed delete is only logged. A job that has not finished when the call ends, after a polling timeout or a cancel, is not deleted and stays at Soniox with its file. If Soniox never answers the request that creates the job, such as after a lost connection, nothing is deleted: the file stays at Soniox, and so does the job if it was created.

Parameter Mapping

Response Mapping

A job that ends with status error is an HTTP 200 from Soniox. Bifrost returns invalid_audio_file as a 400 and any other job failure as a 502.

3. Real-time Transcription

Open a WebSocket to /v1/realtime?intent=transcription and name a Soniox real-time model in the first session.update. Bifrost opens Soniox’s transcribe-websocket and translates both directions.
Soniox takes every setting in a start frame and cannot change one afterwards, so a later session.update can only repeat the settings.

Session Mapping

Events

completed.usage is {"type":"duration","seconds":...}: the audio Soniox had processed when the segment ended, less what earlier segments reported. A session that sets session.bifrost.extensions to true also receives bifrost.transcription.words after each completed segment that has words. Each word carries its timing and, when Soniox identifies speakers, a speaker. language is on the event, taken from the first token that has one.