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

推荐订阅源

爱范儿
爱范儿
H
Help Net Security
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
博客园 - 叶小钗
Y
Y Combinator Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
C
Check Point Blog
Recent Announcements
Recent Announcements
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
B
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(tts): add per-agent voice overrides · openclaw/openc...
steipete · 2026-04-26 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -9,6 +9,9 @@ Docs: https://docs.openclaw.ai

99

### Changes

1010
1111

- Plugins/tokenjuice: bump the bundled tokenjuice runtime to 0.6.3. Thanks @vincentkoc.

12+

- TTS/agents: allow `agents.list[].tts` to override global

13+

`messages.tts` for per-agent voices while keeping shared provider

14+

credentials and preferences in the existing TTS config surface.

1215

- Providers/Azure Speech: add Azure Speech as a bundled TTS provider with

1316

Speech-resource auth, voice listing, SSML escaping, native Ogg/Opus

1417

voice-note output, and telephony output. (#51776) Thanks @leonchui.

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,4 @@

1-

211e9d4cdb309e7fe0c1ed91d060201240a9287f8c5cb3c893aba3f904a20d30 config-baseline.json

2-

ffda2d2911adc03148a368f3b40b17cbdcb7af0066bccdc555e8d596cdea8cda config-baseline.core.json

1+

3efb041739877bd5387ffc87e0ddd11be43d80d38e7779407ce8091dcb797e5e config-baseline.json

2+

5c6e35c5846f654d717d4b20853649e0b45a746423834f539b2a2223abcd5226 config-baseline.core.json

33

7cd9c908f066c143eab2a201efbc9640f483ab28bba92ddeca1d18cc2b528bc3 config-baseline.channel.json

4-

9e131d7734f8b9cc9e7f8af6cc6b6dc81c9971dc551fadbe66fb0d682173f32d config-baseline.plugin.json

4+

a5479c182ec987bb21e814b8a4e7b3bda7190ae5c2b35fd5ca403dfa48afa115 config-baseline.plugin.json

Original file line numberDiff line numberDiff line change

@@ -1,2 +1,2 @@

1-

c911117176b41eebf26470618274a7e093910e9b36855bc045bc8a92f6856745 plugin-sdk-api-baseline.json

2-

ff360635f95beb217b9dd207a87eaf331319a7671aea03acfe05911756741b21 plugin-sdk-api-baseline.jsonl

1+

6eb33044c2a4726f1aeb2d18052643c38c8bf5244bb970f969b1583365063e8b plugin-sdk-api-baseline.json

2+

06e70516047f98d78963c238f1671feb3eea7c7e559c6fa84f403b9562028bb2 plugin-sdk-api-baseline.jsonl

Original file line numberDiff line numberDiff line change

@@ -915,6 +915,11 @@ scripts/sandbox-browser-setup.sh # optional browser image

915915

fastModeDefault: false, // per-agent fast mode override

916916

embeddedHarness: { runtime: "auto", fallback: "pi" },

917917

params: { cacheRetention: "none" }, // overrides matching defaults.models params by key

918+

tts: {

919+

providers: {

920+

elevenlabs: { voiceId: "EXAVITQu4vr4xnSDxMaL" },

921+

},

922+

},

918923

skills: ["docs-search"], // replaces agents.defaults.skills when set

919924

identity: {

920925

name: "Samantha",

@@ -950,6 +955,7 @@ scripts/sandbox-browser-setup.sh # optional browser image

950955

- `default`: when multiple are set, first wins (warning logged). If none set, first list entry is default.

951956

- `model`: string form overrides `primary` only; object form `{ primary, fallbacks }` overrides both (`[]` disables global fallbacks). Cron jobs that only override `primary` still inherit default fallbacks unless you set `fallbacks: []`.

952957

- `params`: per-agent stream params merged over the selected model entry in `agents.defaults.models`. Use this for agent-specific overrides like `cacheRetention`, `temperature`, or `maxTokens` without duplicating the whole model catalog.

958+

- `tts`: optional per-agent text-to-speech overrides. The block deep-merges over `messages.tts`, so keep shared provider credentials and fallback policy in `messages.tts` and set only persona-specific values such as provider, voice, model, style, or auto mode here.

953959

- `skills`: optional per-agent skill allowlist. If omitted, the agent inherits `agents.defaults.skills` when set; an explicit list replaces defaults instead of merging, and `[]` means no skills.

954960

- `thinkingDefault`: optional per-agent default thinking level (`off | minimal | low | medium | high | xhigh | adaptive | max`). Overrides `agents.defaults.thinkingDefault` for this agent when no per-message or session override is set. The selected provider/model profile controls which values are valid; for Google Gemini, `adaptive` keeps provider-owned dynamic thinking (`thinkingLevel` omitted on Gemini 3/3.1, `thinkingBudget: -1` on Gemini 2.5).

955961

- `reasoningDefault`: optional per-agent default reasoning visibility (`on | off | stream`). Applies when no per-message or session reasoning override is set.

Original file line numberDiff line numberDiff line change

@@ -35,6 +35,7 @@ Scope intent:

3535

- `models.providers.*.request.tls.passphrase`

3636

- `skills.entries.*.apiKey`

3737

- `agents.defaults.memorySearch.remote.apiKey`

38+

- `agents.list[].tts.providers.*.apiKey`

3839

- `agents.list[].memorySearch.remote.apiKey`

3940

- `talk.providers.*.apiKey`

4041

- `messages.tts.providers.*.apiKey`

Original file line numberDiff line numberDiff line change

@@ -29,6 +29,13 @@

2929

"secretShape": "secret_input",

3030

"optIn": true

3131

},

32+

{

33+

"id": "agents.list[].tts.providers.*.apiKey",

34+

"configFile": "openclaw.json",

35+

"path": "agents.list[].tts.providers.*.apiKey",

36+

"secretShape": "secret_input",

37+

"optIn": true

38+

},

3239

{

3340

"id": "auth-profiles.api_key.key",

3441

"configFile": "auth-profiles.json",

Original file line numberDiff line numberDiff line change

@@ -109,6 +109,50 @@ Full schema is in [Gateway configuration](/gateway/configuration).

109109

}

110110

```

111111
112+

### Per-agent voice overrides

113+
114+

Use `agents.list[].tts` when one agent should speak with a different provider,

115+

voice, model, style, or auto-TTS mode. The agent block deep-merges over

116+

`messages.tts`, so provider credentials can stay in the global provider config.

117+
118+

```json5

119+

{

120+

messages: {

121+

tts: {

122+

auto: "always",

123+

provider: "elevenlabs",

124+

providers: {

125+

elevenlabs: {

126+

apiKey: "${ELEVENLABS_API_KEY}",

127+

model: "eleven_multilingual_v2",

128+

},

129+

},

130+

},

131+

},

132+

agents: {

133+

list: [

134+

{

135+

id: "reader",

136+

tts: {

137+

providers: {

138+

elevenlabs: {

139+

voiceId: "EXAVITQu4vr4xnSDxMaL",

140+

},

141+

},

142+

},

143+

},

144+

],

145+

},

146+

}

147+

```

148+
149+

Precedence for automatic replies is:

150+
151+

1. `messages.tts`

152+

2. active `agents.list[].tts`

153+

3. local `/tts` preferences for this host

154+

4. inline `[[tts:...]]` directives when model overrides are enabled

155+
112156

### OpenAI primary with ElevenLabs fallback

113157
114158

```json5

@@ -702,7 +746,8 @@ Stored fields:

702746

- `maxLength` (summary threshold; default 1500 chars)

703747

- `summarize` (default `true`)

704748
705-

These override `messages.tts.*` for that host.

749+

These override the effective config from `messages.tts` plus the active

750+

`agents.list[].tts` block for that host.

706751
707752

## Output formats (fixed)

708753
Original file line numberDiff line numberDiff line change

@@ -49,7 +49,7 @@ vi.mock("../api.js", async () => {

4949

};

5050

});

5151
52-

const { _test, maybeApplyTtsToPayload } = await import("./tts.js");

52+

const { _test, maybeApplyTtsToPayload, resolveTtsConfig } = await import("./tts.js");

5353
5454

const nativeVoiceNoteChannels = ["discord", "feishu", "matrix", "telegram", "whatsapp"] as const;

5555

@@ -158,3 +158,82 @@ describe("speech-core native voice-note routing", () => {

158158

});

159159

});

160160

});

161+
162+

describe("speech-core per-agent TTS config", () => {

163+

it("deep-merges the active agent TTS override over messages.tts", () => {

164+

const cfg = {

165+

messages: {

166+

tts: {

167+

enabled: true,

168+

provider: "openai",

169+

providers: {

170+

openai: {

171+

apiKey: "${OPENAI_API_KEY}",

172+

voice: "coral",

173+

speed: 1,

174+

},

175+

},

176+

},

177+

},

178+

agents: {

179+

list: [

180+

{

181+

id: "reader",

182+

tts: {

183+

provider: "openai",

184+

providers: {

185+

openai: {

186+

voice: "nova",

187+

},

188+

},

189+

},

190+

},

191+

],

192+

},

193+

} satisfies OpenClawConfig;

194+
195+

const resolved = resolveTtsConfig(cfg, "reader");

196+
197+

expect(resolved.rawConfig).toMatchObject({

198+

enabled: true,

199+

provider: "openai",

200+

providers: {

201+

openai: {

202+

apiKey: "${OPENAI_API_KEY}",

203+

voice: "nova",

204+

speed: 1,

205+

},

206+

},

207+

});

208+

});

209+
210+

it("ignores prototype-pollution keys in agent TTS overrides", () => {

211+

const cfg = {

212+

messages: {

213+

tts: {

214+

provider: "openai",

215+

providers: {

216+

openai: {

217+

voice: "coral",

218+

},

219+

},

220+

},

221+

},

222+

agents: {

223+

list: [

224+

{

225+

id: "reader",

226+

tts: JSON.parse(

227+

'{"providers":{"openai":{"voice":"nova","__proto__":{"polluted":true}}}}',

228+

),

229+

},

230+

],

231+

},

232+

} as OpenClawConfig;

233+
234+

const resolved = resolveTtsConfig(cfg, "reader");

235+
236+

expect(resolved.rawConfig?.providers?.openai).toEqual({ voice: "nova" });

237+

expect(({} as Record<string, unknown>).polluted).toBeUndefined();

238+

});

239+

});