惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
量子位
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat: add Gradium text-to-speech provider (#64958) · open...
LaurentMazar · 2026-04-25 · via Recent Commits to openclaw:main

@@ -7,16 +7,18 @@ read_when:

77

title: "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.

1111

It 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`

44484549

Microsoft 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`.

226231

Current live voices are `ara`, `eve`, `leo`, `rex`, `sal`, and `una`; `eve` is

227232

the 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.

368395369396

Available 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.