XAISTT
Streaming speech-to-text with xAI, using your own xAI API key. Supports interim results, speaker diarization and multichannel audio. Authenticates with XAI_API_KEY from your environment, or an explicitapi_key.
Fields
int | None
default:"UNSET"
Sample rate of incoming audio in Hz: 8000, 16000, 22050, 24000, 44100 or 48000. Leave unset to detect it automatically. Defaults to None (not set).
Literal['pcm', 'mulaw', 'alaw']
default:"UNSET"
Encoding of incoming audio: “pcm” (16-bit linear), “mulaw” or “alaw”. Defaults to ‘pcm’.
bool
default:"True"
Emit partial transcripts while the user is still speaking, before the final result. Defaults to True.
int
default:"UNSET"
Milliseconds of silence before an utterance is finalized, 0 to 5000. Keep it low for fast turn-taking. Defaults to 50.
str | None
default:"UNSET"
BCP-47 language code, e.g. “en” or “fr”. Any supported language is transcribed; this enables written-form numbers and currencies. Defaults to ‘en’.
bool
default:"UNSET"
Label each transcribed word with the speaker who said it. Defaults to False.
bool
default:"UNSET"
Transcribe each audio channel separately instead of mixing down to mono. Defaults to False.
int
default:"UNSET"
Number of audio channels to transcribe when multichannel is on, 2 to 8. Ignored otherwise. Defaults to 2.
str
default:"UNSET"
WebSocket URL of the xAI speech-to-text endpoint. Defaults to ‘wss://api.x.ai/v1/stt’.
str | None
default:"UNSET"
Transcription model, e.g. “grok-voice-transcribe-1.0”. Leave unset to use xAI’s standard model. Defaults to None (not set).