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

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
The Cloudflare Blog
I
InfoQ
美团技术团队
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
L
LangChain Blog
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
Y
Y Combinator 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
fix: validate minimax speech voice settings · openclaw/op...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

@@ -11,7 +11,8 @@ import type {

1111

SpeechProviderOverrides,

1212

SpeechProviderPlugin,

1313

} from "openclaw/plugin-sdk/speech-core";

14-

import { asFiniteNumber, asObject, trimToUndefined } from "openclaw/plugin-sdk/speech-core";

14+

import { asObject, trimToUndefined } from "openclaw/plugin-sdk/speech-core";

15+

import { asFiniteNumberInRange } from "openclaw/plugin-sdk/string-coerce-runtime";

1516

import {

1617

DEFAULT_MINIMAX_TTS_BASE_URL,

1718

MINIMAX_TTS_MODELS,

@@ -108,12 +109,25 @@ function normalizeMinimaxProviderConfig(

108109

trimToUndefined(raw?.voiceId) ??

109110

trimToUndefined(process.env.MINIMAX_TTS_VOICE_ID) ??

110111

"English_expressive_narrator",

111-

speed: asFiniteNumber(raw?.speed),

112-

vol: asFiniteNumber(raw?.vol),

113-

pitch: asFiniteNumber(raw?.pitch),

112+

speed: normalizeMinimaxSpeed(raw?.speed),

113+

vol: normalizeMinimaxVolume(raw?.vol),

114+

pitch: normalizeMinimaxPitch(raw?.pitch),

114115

};

115116

}

116117118+

function normalizeMinimaxSpeed(value: unknown): number | undefined {

119+

return asFiniteNumberInRange(value, { min: 0.5, max: 2 });

120+

}

121+122+

function normalizeMinimaxVolume(value: unknown): number | undefined {

123+

return asFiniteNumberInRange(value, { min: 0, max: 10, minExclusive: true });

124+

}

125+126+

function normalizeMinimaxPitch(value: unknown): number | undefined {

127+

const pitch = asFiniteNumberInRange(value, { min: -12, max: 12 });

128+

return pitch !== undefined ? Math.trunc(pitch) : undefined;

129+

}

130+117131

function readMinimaxProviderConfig(

118132

config: SpeechProviderConfig,

119133

cfg?: OpenClawConfig,

@@ -124,9 +138,9 @@ function readMinimaxProviderConfig(

124138

baseUrl: normalizeMinimaxTtsBaseUrl(trimToUndefined(config.baseUrl) ?? normalized.baseUrl),

125139

model: trimToUndefined(config.model) ?? normalized.model,

126140

voiceId: trimToUndefined(config.voiceId) ?? normalized.voiceId,

127-

speed: asFiniteNumber(config.speed) ?? normalized.speed,

128-

vol: asFiniteNumber(config.vol) ?? normalized.vol,

129-

pitch: asFiniteNumber(config.pitch) ?? normalized.pitch,

141+

speed: normalizeMinimaxSpeed(config.speed) ?? normalized.speed,

142+

vol: normalizeMinimaxVolume(config.vol) ?? normalized.vol,

143+

pitch: normalizeMinimaxPitch(config.pitch) ?? normalized.pitch,

130144

};

131145

}

132146

@@ -139,9 +153,9 @@ function readMinimaxOverrides(

139153

return {

140154

model: trimToUndefined(overrides.model),

141155

voiceId: trimToUndefined(overrides.voiceId),

142-

speed: asFiniteNumber(overrides.speed),

143-

vol: asFiniteNumber(overrides.vol),

144-

pitch: asFiniteNumber(overrides.pitch),

156+

speed: normalizeMinimaxSpeed(overrides.speed),

157+

vol: normalizeMinimaxVolume(overrides.vol),

158+

pitch: normalizeMinimaxPitch(overrides.pitch),

145159

};

146160

}

147161

@@ -236,15 +250,15 @@ export function buildMinimaxSpeechProvider(): SpeechProviderPlugin {

236250

...(trimToUndefined(talkProviderConfig.voiceId) == null

237251

? {}

238252

: { voiceId: trimToUndefined(talkProviderConfig.voiceId) }),

239-

...(asFiniteNumber(talkProviderConfig.speed) == null

253+

...(normalizeMinimaxSpeed(talkProviderConfig.speed) == null

240254

? {}

241-

: { speed: asFiniteNumber(talkProviderConfig.speed) }),

242-

...(asFiniteNumber(talkProviderConfig.vol) == null

255+

: { speed: normalizeMinimaxSpeed(talkProviderConfig.speed) }),

256+

...(normalizeMinimaxVolume(talkProviderConfig.vol) == null

243257

? {}

244-

: { vol: asFiniteNumber(talkProviderConfig.vol) }),

245-

...(asFiniteNumber(talkProviderConfig.pitch) == null

258+

: { vol: normalizeMinimaxVolume(talkProviderConfig.vol) }),

259+

...(normalizeMinimaxPitch(talkProviderConfig.pitch) == null

246260

? {}

247-

: { pitch: asFiniteNumber(talkProviderConfig.pitch) }),

261+

: { pitch: normalizeMinimaxPitch(talkProviderConfig.pitch) }),

248262

};

249263

},

250264

resolveTalkOverrides: ({ params }) => ({

@@ -254,9 +268,15 @@ export function buildMinimaxSpeechProvider(): SpeechProviderPlugin {

254268

...(trimToUndefined(params.modelId) == null

255269

? {}

256270

: { model: trimToUndefined(params.modelId) }),

257-

...(asFiniteNumber(params.speed) == null ? {} : { speed: asFiniteNumber(params.speed) }),

258-

...(asFiniteNumber(params.vol) == null ? {} : { vol: asFiniteNumber(params.vol) }),

259-

...(asFiniteNumber(params.pitch) == null ? {} : { pitch: asFiniteNumber(params.pitch) }),

271+

...(normalizeMinimaxSpeed(params.speed) == null

272+

? {}

273+

: { speed: normalizeMinimaxSpeed(params.speed) }),

274+

...(normalizeMinimaxVolume(params.vol) == null

275+

? {}

276+

: { vol: normalizeMinimaxVolume(params.vol) }),

277+

...(normalizeMinimaxPitch(params.pitch) == null

278+

? {}

279+

: { pitch: normalizeMinimaxPitch(params.pitch) }),

260280

}),

261281

listVoices: async () => MINIMAX_TTS_VOICES.map((voice) => ({ id: voice, name: voice })),

262282

isConfigured: ({ cfg, providerConfig }) =>