Skip to main content
xAI provides text-to-speech with five expressive voices, inline speech tags for delivery control, and multiple output codecs.
Vision Agents uses Stream Video for real-time WebRTC transport by default. External WebRTC transports are supported as well. Most AI providers offer free tiers to get started.
xAI also provides an LLM and Realtime speech-to-speech. You can use all three in the same agent.

Installation

Quick start

Set XAI_API_KEY in your environment or pass api_key directly.

Parameters

Voices

Speech tags

You can use inline speech tags in your text for fine-grained delivery control. Inline tags: [pause] [long-pause] [laugh] [chuckle] [giggle] [cry] [tsk] [tongue-click] [lip-smack] [breath] [inhale] [exhale] [sigh] [hum-tune] Wrapping tags: <whisper>, <shout>, <slow>, <fast>, <soft>, <loud>, <high-pitch>, <low-pitch>, <sing>

Next steps

xAI LLM

Advanced reasoning with Grok

xAI Realtime

Speech-to-speech over WebSocket