

























@@ -7,16 +7,18 @@ read_when:
77title: "Text-to-speech"
88---
9910-OpenClaw can convert outbound replies into audio using ElevenLabs, Google Gemini, Microsoft, MiniMax, OpenAI, or xAI.
10+OpenClaw can convert outbound replies into audio using ElevenLabs, Google Gemini, Gradium, Microsoft, MiniMax, OpenAI, Vydra, or xAI.
1111It works anywhere OpenClaw can send audio.
12121313## Supported services
14141515- **ElevenLabs** (primary or fallback provider)
1616- **Google Gemini** (primary or fallback provider; uses Gemini API TTS)
17+- **Gradium** (primary or fallback provider; supports voice-note and telephony output)
1718- **Microsoft** (primary or fallback provider; current bundled implementation uses `node-edge-tts`)
1819- **MiniMax** (primary or fallback provider; uses the T2A v2 API)
1920- **OpenAI** (primary or fallback provider; also used for summaries)
21+- **Vydra** (primary or fallback provider; shared image, video, and speech provider)
2022- **xAI** (primary or fallback provider; uses the xAI TTS API)
21232224### Microsoft speech notes
@@ -34,12 +36,14 @@ or ElevenLabs.
34363537## Optional keys
363837-If you want OpenAI, ElevenLabs, Google Gemini, MiniMax, or xAI:
39+If you want OpenAI, ElevenLabs, Google Gemini, Gradium, MiniMax, Vydra, or xAI:
38403941- `ELEVENLABS_API_KEY` (or `XI_API_KEY`)
4042- `GEMINI_API_KEY` (or `GOOGLE_API_KEY`)
43+- `GRADIUM_API_KEY`
4144- `MINIMAX_API_KEY`
4245- `OPENAI_API_KEY`
46+- `VYDRA_API_KEY`
4347- `XAI_API_KEY`
44484549Microsoft speech does **not** require an API key.
@@ -54,6 +58,7 @@ so that provider must also be authenticated if you enable summaries.
5458- [OpenAI Audio API reference](https://platform.openai.com/docs/api-reference/audio)
5559- [ElevenLabs Text to Speech](https://elevenlabs.io/docs/api-reference/text-to-speech)
5660- [ElevenLabs Authentication](https://elevenlabs.io/docs/api-reference/authentication)
61+- [Gradium](/providers/gradium)
5762- [MiniMax T2A v2 API](https://platform.minimaxi.com/document/T2A%20V2)
5863- [node-edge-tts](https://github.com/SchneeHertz/node-edge-tts)
5964- [Microsoft Speech output formats](https://learn.microsoft.com/azure/ai-services/speech-service/rest-text-to-speech#audio-outputs)
@@ -226,6 +231,26 @@ Resolution order is `messages.tts.providers.xai.apiKey` -> `XAI_API_KEY`.
226231Current live voices are `ara`, `eve`, `leo`, `rex`, `sal`, and `una`; `eve` is
227232the default. `language` accepts a BCP-47 tag or `auto`.
228233234+### Gradium primary
235+236+```json5
237+{
238+ messages: {
239+ tts: {
240+ auto: "always",
241+ provider: "gradium",
242+ providers: {
243+ gradium: {
244+ apiKey: "gradium_api_key",
245+ baseUrl: "https://api.gradium.ai",
246+ voiceId: "YTpq7expH9539ERJ",
247+ },
248+ },
249+ },
250+ },
251+}
252+```
253+229254### Disable Microsoft speech
230255231256```json5
@@ -294,7 +319,7 @@ Then run:
294319- `tagged` only sends audio when the reply includes `[[tts:key=value]]` directives or a `[[tts:text]]...[[/tts:text]]` block.
295320- `enabled`: legacy toggle (doctor migrates this to `auto`).
296321- `mode`: `"final"` (default) or `"all"` (includes tool/block replies).
297-- `provider`: speech provider id such as `"elevenlabs"`, `"google"`, `"microsoft"`, `"minimax"`, or `"openai"` (fallback is automatic).
322+- `provider`: speech provider id such as `"elevenlabs"`, `"google"`, `"gradium"`, `"microsoft"`, `"minimax"`, `"openai"`, `"vydra"`, or `"xai"` (fallback is automatic).
298323- If `provider` is **unset**, OpenClaw uses the first configured speech provider in registry auto-select order.
299324- Legacy `provider: "edge"` still works and is normalized to `microsoft`.
300325- `summaryModel`: optional cheap model for auto-summary; defaults to `agents.defaults.model.primary`.
@@ -306,7 +331,7 @@ Then run:
306331- `maxTextLength`: hard cap for TTS input (chars). `/tts audio` fails if exceeded.
307332- `timeoutMs`: request timeout (ms).
308333- `prefsPath`: override the local prefs JSON path (provider/limit/summary).
309-- `apiKey` values fall back to env vars (`ELEVENLABS_API_KEY`/`XI_API_KEY`, `GEMINI_API_KEY`/`GOOGLE_API_KEY`, `MINIMAX_API_KEY`, `OPENAI_API_KEY`).
334+- `apiKey` values fall back to env vars (`ELEVENLABS_API_KEY`/`XI_API_KEY`, `GEMINI_API_KEY`/`GOOGLE_API_KEY`, `GRADIUM_API_KEY`, `MINIMAX_API_KEY`, `OPENAI_API_KEY`, `VYDRA_API_KEY`, `XAI_API_KEY`).
310335- `providers.elevenlabs.baseUrl`: override ElevenLabs API base URL.
311336- `providers.openai.baseUrl`: override the OpenAI TTS endpoint.
312337- Resolution order: `messages.tts.providers.openai.baseUrl` -> `OPENAI_TTS_BASE_URL` -> `https://api.openai.com/v1`
@@ -328,6 +353,8 @@ Then run:
328353- `providers.google.voiceName`: Gemini prebuilt voice name (default `Kore`; `voice` is also accepted).
329354- `providers.google.baseUrl`: override the Gemini API base URL. Only `https://generativelanguage.googleapis.com` is accepted.
330355- If `messages.tts.providers.google.apiKey` is omitted, TTS can reuse `models.providers.google.apiKey` before env fallback.
356+- `providers.gradium.baseUrl`: override Gradium API base URL (default `https://api.gradium.ai`).
357+- `providers.gradium.voiceId`: Gradium voice identifier (default Emma, `YTpq7expH9539ERJ`).
331358- `providers.xai.apiKey`: xAI TTS API key (env: `XAI_API_KEY`).
332359- `providers.xai.baseUrl`: override the xAI TTS base URL (default `https://api.x.ai/v1`, env: `XAI_BASE_URL`).
333360- `providers.xai.voiceId`: xAI voice id (default `eve`; current live voices: `ara`, `eve`, `leo`, `rex`, `sal`, `una`).
@@ -368,8 +395,8 @@ Here you go.
368395369396Available directive keys (when enabled):
370397371-- `provider` (registered speech provider id, for example `openai`, `elevenlabs`, `google`, `minimax`, or `microsoft`; requires `allowProvider: true`)
372-- `voice` (OpenAI voice), `voiceName` / `voice_name` / `google_voice` (Google voice), or `voiceId` (ElevenLabs / MiniMax / xAI)
398+- `provider` (registered speech provider id, for example `openai`, `elevenlabs`, `google`, `gradium`, `minimax`, `microsoft`, `vydra`, or `xai`; requires `allowProvider: true`)
399+- `voice` (OpenAI or Gradium voice), `voiceName` / `voice_name` / `google_voice` (Google voice), or `voiceId` (ElevenLabs / Gradium / MiniMax / xAI)
373400- `model` (OpenAI TTS model, ElevenLabs model id, or MiniMax model) or `google_model` (Google TTS model)
374401- `stability`, `similarityBoost`, `style`, `speed`, `useSpeakerBoost`
375402- `vol` / `volume` (MiniMax volume, 0-10)
@@ -431,6 +458,7 @@ These override `messages.tts.*` for that host.
431458- 44.1kHz / 128kbps is the default balance for speech clarity.
432459- **MiniMax**: MP3 (`speech-2.8-hd` model, 32kHz sample rate). Voice-note format not natively supported; use OpenAI or ElevenLabs for guaranteed Opus voice messages.
433460- **Google Gemini**: Gemini API TTS returns raw 24kHz PCM. OpenClaw wraps it as WAV for audio attachments and returns PCM directly for Talk/telephony. Native Opus voice-note format is not supported by this path.
461+- **Gradium**: WAV for audio attachments, Opus for voice-note targets, and `ulaw_8000` at 8 kHz for telephony.
434462- **xAI**: MP3 by default; `responseFormat` may be `mp3`, `wav`, `pcm`, `mulaw`, or `alaw`. OpenClaw uses xAI's batch REST TTS endpoint and returns a complete audio attachment; xAI's streaming TTS WebSocket is not used by this provider path. Native Opus voice-note format is not supported by this path.
435463- **Microsoft**: uses `microsoft.outputFormat` (default `audio-24khz-48kbitrate-mono-mp3`).
436464- The bundled transport accepts an `outputFormat`, but not all formats are available from the service.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。