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

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

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 volcengine speech speed ratio · openclaw/op...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

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

55

SpeechProviderOverrides,

66

SpeechProviderPlugin,

77

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

8-

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

8+

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

9+

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

910

import { volcengineTTS, type VolcengineTtsEncoding } from "./tts.js";

10111112

const DEFAULT_VOICE = "en_female_anna_mars_bigtts";

@@ -45,6 +46,10 @@ type VolcengineTtsProviderOverrides = {

4546

emotion?: string;

4647

};

474849+

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

50+

return asFiniteNumberInRange(value, { min: 0.2, max: 3 });

51+

}

52+4853

function normalizeVolcengineProviderConfig(

4954

rawConfig: Record<string, unknown>,

5055

): VolcengineTtsProviderConfig {

@@ -77,7 +82,7 @@ function normalizeVolcengineProviderConfig(

7782

trimToUndefined(process.env.VOLCENGINE_TTS_APP_KEY) ??

7883

DEFAULT_APP_KEY,

7984

baseUrl: trimToUndefined(raw?.baseUrl) ?? trimToUndefined(process.env.VOLCENGINE_TTS_BASE_URL),

80-

speedRatio: asFiniteNumber(raw?.speedRatio),

85+

speedRatio: normalizeSpeedRatio(raw?.speedRatio),

8186

emotion: trimToUndefined(raw?.emotion),

8287

};

8388

}

@@ -105,7 +110,7 @@ function readProviderConfig(config: SpeechProviderConfig): VolcengineTtsProvider

105110

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

106111

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

107112

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

108-

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

113+

speedRatio: normalizeSpeedRatio(config.speedRatio) ?? normalized.speedRatio,

109114

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

110115

};

111116

}

@@ -118,7 +123,7 @@ function readVolcengineOverrides(

118123

}

119124

return {

120125

voice: trimToUndefined(overrides.voice),

121-

speedRatio: asFiniteNumber(overrides.speedRatio),

126+

speedRatio: normalizeSpeedRatio(overrides.speedRatio),

122127

emotion: trimToUndefined(overrides.emotion),

123128

};

124129

}