Configure Gradium Text-to-Speech in OpenClaw
This page explains how to add the Gradium text-to-speech provider to OpenClaw, covering plugin installation, API key setup, and configuration. It is for users who need WAV, Opus, or telephony audio output.
Read this when
- You want Gradium for text-to-speech
- You need Gradium API key, voice, or directive token configuration
Gradium serves as a text-to-speech provider for OpenClaw. It produces three kinds of audio: standard WAV replies, Opus output that works with voice notes, and 8 kHz u-law audio for telephony surfaces.
| Property | Value |
|---|---|
| Provider id | gradium |
| Auth | GRADIUM_API_KEY or config apiKey |
| Base URL | https://api.gradium.ai (default) |
| Default voice | Emma (YTpq7expH9539ERJ) |
Install plugin
Gradium ships as an official external plugin. To add it:
openclaw plugins install @openclaw/gradium-speech
If a Gateway is already running, the installation is picked up without a restart. If not, it applies the next time the process starts. Refer to Apply changes and inspect.
Setup
Generate a Gradium API key, then make it available either through an env var or the config key. When both are set, the config key wins.
Env var
export GRADIUM_API_KEY="<your-gradium-api-key>"
Config key
{
tts: {
auto: "always",
provider: "gradium",
providers: {
gradium: {
apiKey: "${GRADIUM_API_KEY}",
},
},
},
}
Config
{
tts: {
auto: "always",
provider: "gradium",
providers: {
gradium: {
speakerVoiceId: "YTpq7expH9539ERJ",
// apiKey: "${GRADIUM_API_KEY}",
// baseUrl: "https://api.gradium.ai",
},
},
},
}
| Key | Type | Description |
|---|---|---|
tts.providers.gradium.apiKey | string | The resolved API key. Accepts ${ENV} and secret refs. |
tts.providers.gradium.baseUrl | string | Gradium API URL over HTTPS on api.gradium.ai. Any trailing slashes are removed. Defaults to https://api.gradium.ai. |
tts.providers.gradium.speakerVoiceId | string | Voice id applied by default when no directive overrides it. |
The target surface decides the output format on its own (refer to Output), and openclaw.json offers no way to change it.
Voices
| Name | Voice ID |
|---|---|
| Arthur | 3jUdJyOi9pgbxBTK |
| Christina | 2H4HY2CBNyJHBCrP |
| Emma (default) | YTpq7expH9539ERJ |
| John | KWJiFWu2O9nMPYcR |
| Kent | LFZvm12tW_z0xfGo |
| Sydney | jtEKaLYNn6iif5PR |
| Tiffany | Eu9iL_CYe8N-Gkx_ |
Per-message voice override
Provided the active speech policy permits voice overrides, you can swap voices mid-stream using a directive token. The forms below are interchangeable, and each expects a provider-native voice id:
/voice:LFZvm12tW_z0xfGo
/voice_id:LFZvm12tW_z0xfGo
/voiceid:LFZvm12tW_z0xfGo
/gradium_voice:LFZvm12tW_z0xfGo
/gradiumvoice:LFZvm12tW_z0xfGo
Should the speech policy forbid voice overrides, the directive still gets consumed, but nothing happens.
Output
The target surface determines which output format is produced; no other formats are synthesized by this provider.
| Target | Format | File ext | Sample rate | Voice-compatible flag |
|---|---|---|---|---|
| Standard audio | wav | .wav | provider | no |
| Voice note | opus | .opus | provider | yes |
| Telephony | ulaw_8000 | n/a | 8 kHz | n/a |
Auto-select order
When several TTS providers are configured, Gradium sits at position 30 in the auto-select order. For details on how OpenClaw chooses the active provider whenever tts.provider is left unpinned, see Text-to-Speech.