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

推荐订阅源

U
Unit 42
T
The Blog of Author Tim Ferriss
H
Help Net Security
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
博客园 - 聂微东
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
B
Blog
Engineering at Meta
Engineering at Meta
V
V2EX
Hugging Face - Blog
Hugging Face - 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: honor telephony tts directives · openclaw/openclaw@4...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -152,6 +152,31 @@ function mergeVoiceSettingsOverride(

152152

};

153153

}

154154155+

function resolveVoiceSettingsOverride(

156+

base: ElevenLabsProviderConfig["voiceSettings"],

157+

overrides: unknown,

158+

): ElevenLabsProviderConfig["voiceSettings"] {

159+

const voiceSettings = asObject(overrides);

160+

return {

161+

...base,

162+

...(asFiniteNumber(voiceSettings?.stability) == null

163+

? {}

164+

: { stability: asFiniteNumber(voiceSettings?.stability) }),

165+

...(asFiniteNumber(voiceSettings?.similarityBoost) == null

166+

? {}

167+

: { similarityBoost: asFiniteNumber(voiceSettings?.similarityBoost) }),

168+

...(asFiniteNumber(voiceSettings?.style) == null

169+

? {}

170+

: { style: asFiniteNumber(voiceSettings?.style) }),

171+

...(asBoolean(voiceSettings?.useSpeakerBoost) == null

172+

? {}

173+

: { useSpeakerBoost: asBoolean(voiceSettings?.useSpeakerBoost) }),

174+

...(asFiniteNumber(voiceSettings?.speed) == null

175+

? {}

176+

: { speed: asFiniteNumber(voiceSettings?.speed) }),

177+

};

178+

}

179+155180

function parseDirectiveToken(ctx: SpeechDirectiveTokenParseContext) {

156181

try {

157182

switch (ctx.key) {

@@ -469,7 +494,6 @@ export function buildElevenLabsSpeechProvider(): SpeechProviderPlugin {

469494

const outputFormat =

470495

trimToUndefined(overrides.outputFormat) ??

471496

(req.target === "voice-note" ? "opus_48000_64" : "mp3_44100_128");

472-

const overrideVoiceSettings = asObject(overrides.voiceSettings);

473497

const latencyTier = asFiniteNumber(overrides.latencyTier);

474498

const audioBuffer = await elevenLabsTTS({

475499

text: req.text,

@@ -487,24 +511,7 @@ export function buildElevenLabsSpeechProvider(): SpeechProviderPlugin {

487511

| undefined) ?? config.applyTextNormalization,

488512

languageCode: trimToUndefined(overrides.languageCode) ?? config.languageCode,

489513

latencyTier,

490-

voiceSettings: {

491-

...config.voiceSettings,

492-

...(asFiniteNumber(overrideVoiceSettings?.stability) == null

493-

? {}

494-

: { stability: asFiniteNumber(overrideVoiceSettings?.stability) }),

495-

...(asFiniteNumber(overrideVoiceSettings?.similarityBoost) == null

496-

? {}

497-

: { similarityBoost: asFiniteNumber(overrideVoiceSettings?.similarityBoost) }),

498-

...(asFiniteNumber(overrideVoiceSettings?.style) == null

499-

? {}

500-

: { style: asFiniteNumber(overrideVoiceSettings?.style) }),

501-

...(asBoolean(overrideVoiceSettings?.useSpeakerBoost) == null

502-

? {}

503-

: { useSpeakerBoost: asBoolean(overrideVoiceSettings?.useSpeakerBoost) }),

504-

...(asFiniteNumber(overrideVoiceSettings?.speed) == null

505-

? {}

506-

: { speed: asFiniteNumber(overrideVoiceSettings?.speed) }),

507-

},

514+

voiceSettings: resolveVoiceSettingsOverride(config.voiceSettings, overrides.voiceSettings),

508515

timeoutMs: req.timeoutMs,

509516

});

510517

return {

@@ -516,6 +523,7 @@ export function buildElevenLabsSpeechProvider(): SpeechProviderPlugin {

516523

},

517524

synthesizeTelephony: async (req) => {

518525

const config = readElevenLabsProviderConfig(req.providerConfig);

526+

const overrides = req.providerOverrides ?? {};

519527

const apiKey =

520528

config.apiKey || resolveElevenLabsApiKeyWithProfileFallback() || process.env.XI_API_KEY;

521529

if (!apiKey) {

@@ -527,13 +535,18 @@ export function buildElevenLabsSpeechProvider(): SpeechProviderPlugin {

527535

text: req.text,

528536

apiKey,

529537

baseUrl: config.baseUrl,

530-

voiceId: config.voiceId,

531-

modelId: config.modelId,

538+

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

539+

modelId: trimToUndefined(overrides.modelId) ?? config.modelId,

532540

outputFormat,

533-

seed: config.seed,

534-

applyTextNormalization: config.applyTextNormalization,

535-

languageCode: config.languageCode,

536-

voiceSettings: config.voiceSettings,

541+

seed: asFiniteNumber(overrides.seed) ?? config.seed,

542+

applyTextNormalization:

543+

(trimToUndefined(overrides.applyTextNormalization) as

544+

| "auto"

545+

| "on"

546+

| "off"

547+

| undefined) ?? config.applyTextNormalization,

548+

languageCode: trimToUndefined(overrides.languageCode) ?? config.languageCode,

549+

voiceSettings: resolveVoiceSettingsOverride(config.voiceSettings, overrides.voiceSettings),

537550

timeoutMs: req.timeoutMs,

538551

});

539552

return { audioBuffer, outputFormat, sampleRate };