xAI Launches Standalone Grok Text to Speech API with Custom Expressive Speech Tags
Elon Musk's xAI launched Grok Voice TTS 1.0, a new text-to-speech model supporting automatic language detection. The model converts text into spoken audio across more than 20 languages and offers five built-in voices with inline speech tags to control pauses, pitch, and speed. Output is available in formats including MP3, WAV, and PCM at sample rates up to 48 kHz, with a limit of 15,000 characters per request.
Elon Musk’s artificial intelligence enterprise, xAI, has officially released Grok Text to Speech (TTS), a standalone voice synthesis API that converts written text into highly expressive, natural-sounding audio. The newly launched endpoint delivers low-latency speech synthesis supporting automatic language detection, five built-in voice personalities, and a versatile tag system that allows developers to precisely control delivery cadence, tone, and emotions.
Multilingual Support and Real-Time Normalization
The Grok TTS engine supports more than 20 languages using BCP-47 language codes. To facilitate seamless multilingual application development, xAI has integrated an automatic language detection feature. By passing "auto" in the language parameter, the model dynamically analyzes input text to identify and apply the correct pronunciation and linguistic rules.
A single REST API request accepts up to 15,000 characters—translating to roughly 10 to 12 minutes of continuous spoken audio. For workflows requiring longer generations, such as audiobooks or lengthy articles, xAI provides a streaming WebSocket endpoint that bypasses the character limit and returns audio before the entire input is processed.
To prevent robotic pronunciations of non-standard text, Grok TTS includes an optional text normalization feature ("text_normalization"). When enabled, the model automatically expands written symbols, abbreviations, currencies, and numbers into their spoken-word equivalents before synthesis. For example, “$100” is processed as “one hundred dollars” and “Dr. Smith” is synthesized as “Doctor Smith”.
Controlling Vocal Dynamics: Wrapping vs. Inline Tags
Rather than applying uniform global adjustments to synthesized audio, Grok TTS offers precise control over performance dynamics using a hybrid tag system. Developers can embed speech tags directly into the input text string to shape how specific words or sentences are spoken, replicating natural human conversational nuances.
These adjustments are split into two structural formats:
-
Inline Speech Tags: Dropped at specific points in the text, these tags trigger brief vocal gestures or pauses.
[pause]or[long-pause]to insert a brief silence for pacing.[laugh],[chuckle], or[giggle]to add an amused gesture.[sigh],[breath],[inhale], or[exhale]to simulate natural breathing patterns.- Mouth sounds such as
[tsk],[tongue-click], and[lip-smack].
-
Wrapping Speech Tags: Structured as XML-style tags, wrapping tags enclose a span of text to alter vocal parameters or emotional states for that specific segment.
<whisper>...</whisper>to deliver lines in a whispered voice.<soft>...</soft>or<loud>...</loud>to control local volume.<slow>...</slow>or<fast>...</fast>to adjust speaking speed.<higher-pitch>...</higher-pitch>or<lower-pitch>...</lower-pitch>to alter the tone.<emphasis>...</emphasis>to place vocal stress on key words.
By combining these tags within a single string, developers can generate highly nuanced narration, as shown in this example payload:
{
"text": "I have to tell you a secret... <whisper>I am the smartest AI.</whisper> [pause] <emphasis>Seriously!</emphasis> [laugh]",
"voice_id": "ara",
"language": "en"
}
Pre-Configured Voices and High-Fidelity Audio Formats
Grok TTS ships with five pre-configured voices covering distinct tones and professional use cases:
- Eve: Energetic and upbeat (the default selection, ideal for announcements).
- Ara: Warm and friendly (designed for conversational interfaces).
- Rex: Confident and clear (best suited for corporate and customer support environments).
- Sal: Smooth and balanced (a versatile voice that works well across diverse content types).
- Leo: Authoritative and strong (optimal for instructional and educational delivery).
The API outputs audio in several industry-standard formats, including MP3, WAV, raw PCM, and telephony-grade companding standards (G.711 μ-law and A-law). Configurable sample rates range from 8 kHz (the standard bandwidth for legacy telecom systems and call centers) up to 48 kHz (high-fidelity professional audio).
The Native xAI TTS API Architecture
Unlike third-party gateway implementations that stream raw binary bytes directly, the native xAI REST API (/v1/tts) returns a standard JSON response containing the synthesized audio and rich structural metadata. The audio is provided as a base64-encoded string, which can be decoded by client-side applications for playback.
The JSON response schema contains the following keys:
"audio": The base64-encoded audio string."content_type": The MIME type of the decoded audio (e.g.,audio/mpegoraudio/wav)."duration": The total duration of the generated audio in seconds."audio_timestamps": An optional array containing precise character-level timestamps, representing the start and end times for each character in the input string. This metadata is essential for syncing captions, real-time lip-syncing, or visual highlighting.
Below is an example of a typical native request to the REST endpoint:
curl -X POST https://api.x.ai/v1/tts \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello! Welcome to the xAI Text to Speech API.",
"voice_id": "eve",
"language": "en"
}'
For client-side applications, such as browser-based voice agents, developers must route requests through a secure server-side proxy to protect their API keys, decode the base64 payload into a raw audio blob, and initiate playback using standard browser audio APIs.
Ecosystem Integration and Production Pricing
The standalone Grok TTS API is priced at $15.00 per 1 million characters. This model is launched alongside xAI’s sister service, Grok Speech-to-Text (STT), which offers audio transcription at $0.10 per hour for batch processing and $0.20 per hour for real-time streaming.
Both endpoints leverage the battle-tested audio and voice infrastructure developed by xAI, which already powers Grok Voice features in xAI’s mobile apps, Tesla vehicles, and Starlink customer support systems. These microservices are designed to function either as standalone utilities or as the voice synthesis and recognition foundation for full-duplex, real-time conversational agents.
The company recently deployed grok-voice-think-fast-1.0, an advanced full-duplex voice agent designed to reason in real time during live telephone operations. That system uses the underlying transcription and generation capabilities of models like Grok TTS to interact with human callers. While the larger “Think Fast” model manages multi-step enterprise workflows and live database tools, the standalone TTS model remains focused purely on converting raw text strings into natural-sounding audio.
- #Voice AI
Author
Krishnan
Contributor
Enterprise Technology Explorer is a business and operations professional with over 15 years of experience across multiple industries working with Fortune 500 companies. With a solid foundation in enterprise processes, digital adoption, and technology evaluation, he excels at bridging business needs with emerging technologies to build scalable enterprise-grade applications.