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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
量子位
雷峰网
雷峰网
宝玉的分享
宝玉的分享
V
Visual Studio Blog
博客园_首页
小众软件
小众软件
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学

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(tts): add Azure Speech provider · openclaw/openclaw@...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -7,11 +7,12 @@ read_when:

77

title: "Text-to-speech"

88

---

9910-

OpenClaw can convert outbound replies into audio using ElevenLabs, Google Gemini, Gradium, Inworld, Local CLI, Microsoft, MiniMax, OpenAI, Volcengine, Vydra, xAI, or Xiaomi MiMo.

10+

OpenClaw can convert outbound replies into audio using Azure Speech, ElevenLabs, Google Gemini, Gradium, Inworld, Local CLI, Microsoft, MiniMax, OpenAI, Volcengine, Vydra, xAI, or Xiaomi MiMo.

1111

It works anywhere OpenClaw can send audio.

12121313

## Supported services

141415+

- **Azure Speech** (primary or fallback provider; uses the Azure AI Speech REST API)

1516

- **ElevenLabs** (primary or fallback provider)

1617

- **Google Gemini** (primary or fallback provider; uses Gemini API TTS)

1718

- **Gradium** (primary or fallback provider; supports voice-note and telephony output)

@@ -40,8 +41,10 @@ or ElevenLabs.

40414142

## Optional keys

424343-

If you want ElevenLabs, Google Gemini, Gradium, Inworld, MiniMax, OpenAI, Volcengine, Vydra, xAI, or Xiaomi MiMo:

44+

If you want Azure Speech, ElevenLabs, Google Gemini, Gradium, Inworld, MiniMax, OpenAI, Volcengine, Vydra, xAI, or Xiaomi MiMo:

444546+

- `AZURE_SPEECH_KEY` plus `AZURE_SPEECH_REGION` (also accepts

47+

`AZURE_SPEECH_API_KEY`, `SPEECH_KEY`, and `SPEECH_REGION`)

4548

- `ELEVENLABS_API_KEY` (or `XI_API_KEY`)

4649

- `GEMINI_API_KEY` (or `GOOGLE_API_KEY`)

4750

- `GRADIUM_API_KEY`

@@ -67,6 +70,8 @@ so that provider must also be authenticated if you enable summaries.

67706871

- [OpenAI Text-to-Speech guide](https://platform.openai.com/docs/guides/text-to-speech)

6972

- [OpenAI Audio API reference](https://platform.openai.com/docs/api-reference/audio)

73+

- [Azure Speech REST text-to-speech](https://learn.microsoft.com/azure/ai-services/speech-service/rest-text-to-speech)

74+

- [Azure Speech provider](/providers/azure-speech)

7075

- [ElevenLabs Text to Speech](https://elevenlabs.io/docs/api-reference/text-to-speech)

7176

- [ElevenLabs Authentication](https://elevenlabs.io/docs/api-reference/authentication)

7277

- [Gradium](/providers/gradium)

@@ -145,6 +150,36 @@ Full schema is in [Gateway configuration](/gateway/configuration).

145150

}

146151

```

147152153+

### Azure Speech primary

154+155+

```json5

156+

{

157+

messages: {

158+

tts: {

159+

auto: "always",

160+

provider: "azure-speech",

161+

providers: {

162+

"azure-speech": {

163+

// apiKey falls back to AZURE_SPEECH_KEY.

164+

// region falls back to AZURE_SPEECH_REGION.

165+

voice: "en-US-JennyNeural",

166+

lang: "en-US",

167+

outputFormat: "audio-24khz-48kbitrate-mono-mp3",

168+

voiceNoteOutputFormat: "ogg-24khz-16bit-mono-opus",

169+

},

170+

},

171+

},

172+

},

173+

}

174+

```

175+176+

Azure Speech uses a Speech resource key, not an Azure OpenAI key. Resolution

177+

order is `messages.tts.providers.azure-speech.apiKey` ->

178+

`AZURE_SPEECH_KEY` -> `AZURE_SPEECH_API_KEY` -> `SPEECH_KEY`, plus

179+

`messages.tts.providers.azure-speech.region` -> `AZURE_SPEECH_REGION` ->

180+

`SPEECH_REGION` for the region. New config should use `azure-speech`; `azure`

181+

is accepted as a provider alias.

182+148183

### Microsoft primary (no API key)

149184150185

```json5

@@ -495,7 +530,21 @@ Then run:

495530

- `maxTextLength`: hard cap for TTS input (chars). `/tts audio` fails if exceeded.

496531

- `timeoutMs`: request timeout (ms).

497532

- `prefsPath`: override the local prefs JSON path (provider/limit/summary).

498-

- `apiKey` values fall back to env vars (`ELEVENLABS_API_KEY`/`XI_API_KEY`, `GEMINI_API_KEY`/`GOOGLE_API_KEY`, `GRADIUM_API_KEY`, `INWORLD_API_KEY`, `MINIMAX_API_KEY`, `OPENAI_API_KEY`, `VYDRA_API_KEY`, `XAI_API_KEY`, `XIAOMI_API_KEY`). Volcengine uses `appId`/`token` instead.

533+

- `apiKey` values fall back to env vars (`AZURE_SPEECH_KEY`/`AZURE_SPEECH_API_KEY`/`SPEECH_KEY`, `ELEVENLABS_API_KEY`/`XI_API_KEY`, `GEMINI_API_KEY`/`GOOGLE_API_KEY`, `GRADIUM_API_KEY`, `INWORLD_API_KEY`, `MINIMAX_API_KEY`, `OPENAI_API_KEY`, `VYDRA_API_KEY`, `XAI_API_KEY`, `XIAOMI_API_KEY`). Volcengine uses `appId`/`token` instead.

534+

- `providers.azure-speech.apiKey`: Azure Speech resource key (env:

535+

`AZURE_SPEECH_KEY`, `AZURE_SPEECH_API_KEY`, or `SPEECH_KEY`).

536+

- `providers.azure-speech.region`: Azure Speech region such as `eastus` (env:

537+

`AZURE_SPEECH_REGION` or `SPEECH_REGION`).

538+

- `providers.azure-speech.endpoint` / `providers.azure-speech.baseUrl`: optional

539+

Azure Speech endpoint/base URL override.

540+

- `providers.azure-speech.voice`: Azure voice ShortName (default

541+

`en-US-JennyNeural`).

542+

- `providers.azure-speech.lang`: SSML language code (default `en-US`).

543+

- `providers.azure-speech.outputFormat`: Azure `X-Microsoft-OutputFormat` for

544+

standard audio output (default `audio-24khz-48kbitrate-mono-mp3`).

545+

- `providers.azure-speech.voiceNoteOutputFormat`: Azure

546+

`X-Microsoft-OutputFormat` for voice-note output (default

547+

`ogg-24khz-16bit-mono-opus`).

499548

- `providers.elevenlabs.baseUrl`: override ElevenLabs API base URL.

500549

- `providers.openai.baseUrl`: override the OpenAI TTS endpoint.

501550

- Resolution order: `messages.tts.providers.openai.baseUrl` -> `OPENAI_TTS_BASE_URL` -> `https://api.openai.com/v1`