Skip to main content

Soniox STT

SonioxSTT streams PCM audio to the Soniox real-time transcribe WebSocket (wss://stt-rt.soniox.com/transcribe-websocket). Uses the ws package — no vendor SDK required. The adapter accumulates is_final tokens into segments and flushes them when an <end> / <fin> endpoint token is received.

Install

Usage

Use the namespaced import (getpatter/stt/soniox) or the flat re-export (SonioxSTT). Both auto-resolve SONIOX_API_KEY from the environment when apiKey is omitted.
Plug it into an agent:

Models and rates

Soniox bills per minute of streamed audio. Default rate from getpatter/pricing:
ModelRate / min
stt-rt-v4 (default)$0.002
stt-rt-v3$0.002
stt-rt-v2$0.002
($0.12/hr = $0.002/min. Override via new Patter({ pricing: { soniox: { price: ... } } }).)

Languages

Soniox real-time uses language hints rather than a single language code — pass a list of BCP-47 codes that the engine considers when scoring tokens:
enableLanguageIdentification: true (default) attaches a language code to each token. Real-time STT v4 supports 60+ languages — see the Soniox language matrix.

Options

OptionDefaultNotes
apiKeyReads from SONIOX_API_KEY when omitted.
model"stt-rt-v4""stt-rt-v4", "stt-rt-v3", "stt-rt-v2".
languageHintsBCP-47 code list.
languageHintsStrictfalseRestrict to the supplied hints only.
sampleRate160008000, 16000, 24000 Hz.
numChannels1Mono only for telephony.
enableSpeakerDiarizationfalseServer-side speaker IDs.
enableLanguageIdentificationtruePer-token language codes.
maxEndpointDelayMs500Silence (ms) before endpoint, range [500, 3000].
clientReferenceIdOptional correlation ID surfaced in Soniox dashboards.
baseUrlSoniox WS endpointOverride for proxying.