> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gradium.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> Use Gradium text-to-speech in OpenClaw agents

OpenClaw is a self-hosted agent gateway for messaging channels, agent sessions, and tool-driven workflows. Its bundled Gradium speech provider lets OpenClaw agents turn replies into audio, voice-note-compatible Opus output, or 8 kHz u-law audio for telephony surfaces.

<CardGroup cols={2}>
  <Card title="OpenClaw Gradium provider" icon="arrow-up-right-from-square" href="https://docs.openclaw.ai/providers/gradium">
    OpenClaw's provider reference for Gradium TTS.
  </Card>

  <Card title="GitHub integration" icon="github" href="https://github.com/openclaw/openclaw/tree/6dbd5bd4460e5be753c2c0716829568a398a9562/extensions/gradium">
    View the OpenClaw Gradium extension source.
  </Card>

  <Card title="Gradium TTS guide" icon="book" href="/guides/text-to-speech">
    Gradium WebSocket TTS setup and streaming behavior.
  </Card>
</CardGroup>

## Setup

Create a Gradium API key, then expose it to OpenClaw with an environment variable:

```bash theme={null}
export GRADIUM_API_KEY=gd_your_api_key_here
```

OpenClaw can also read the key from `messages.tts.providers.gradium.apiKey` in `~/.openclaw/openclaw.json`.

## Basic config

Set `gradium` as the TTS provider and choose a Gradium voice ID.

```json theme={null}
{
  "messages": {
    "tts": {
      "auto": "always",
      "provider": "gradium",
      "providers": {
        "gradium": {
          "voiceId": "YTpq7expH9539ERJ",
          "apiKey": "${GRADIUM_API_KEY}"
        }
      }
    }
  }
}
```

Use `auto: "always"` when every eligible agent reply should include audio. Use OpenClaw's session commands or per-agent config when you need more targeted behavior.

## Provider settings

| Setting                                  | Description                                                                            |
| ---------------------------------------- | -------------------------------------------------------------------------------------- |
| `messages.tts.provider`                  | Set to `gradium` to make Gradium the primary TTS provider.                             |
| `messages.tts.providers.gradium.apiKey`  | Gradium API key. You can use `${GRADIUM_API_KEY}` or rely on the environment variable. |
| `messages.tts.providers.gradium.voiceId` | Default Gradium voice ID for replies.                                                  |
| `messages.tts.providers.gradium.baseUrl` | Optional Gradium API origin override. Defaults to `https://api.gradium.ai`.            |

## Voices

OpenClaw's Gradium provider defaults to Emma.

| Voice     | Voice ID           |
| --------- | ------------------ |
| Emma      | `YTpq7expH9539ERJ` |
| Kent      | `LFZvm12tW_z0xfGo` |
| Tiffany   | `Eu9iL_CYe8N-Gkx_` |
| Christina | `2H4HY2CBNyJHBCrP` |
| Sydney    | `jtEKaLYNn6iif5PR` |
| John      | `KWJiFWu2O9nMPYcR` |
| Arthur    | `3jUdJyOi9pgbxBTK` |

## Output behavior

OpenClaw chooses the Gradium output format from the destination surface:

| Destination          | Gradium output              |
| -------------------- | --------------------------- |
| Standard audio reply | WAV audio file              |
| Voice-note channel   | Opus voice-compatible audio |
| Telephony surface    | `ulaw_8000` at 8 kHz        |

## When to use OpenClaw with Gradium

* **Messaging-channel agents**: speak replies across OpenClaw-supported channels without building per-channel audio delivery.
* **Voice-note workflows**: send spoken responses as voice-compatible channel media.
* **Telephony surfaces**: synthesize 8 kHz u-law audio for phone-oriented integrations.
* **Self-hosted agent stacks**: keep OpenClaw's local gateway model while using Gradium for speech output.
