fix(tts): preserve command voice delivery decision · openclaw/openclaw@2204b25
xuruiray
·
2026-05-15
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -214,6 +214,22 @@ describe("handleTtsCommands status fallback reporting", () => {
|
214 | 214 | ); |
215 | 215 | }); |
216 | 216 | |
| 217 | +it("uses the channel-derived audioAsVoice decision for /tts audio", async () => { |
| 218 | +ttsMocks.textToSpeech.mockResolvedValue({ |
| 219 | +success: true, |
| 220 | +audioPath: "/tmp/channel-voice.ogg", |
| 221 | +provider: PRIMARY_TTS_PROVIDER, |
| 222 | +voiceCompatible: false, |
| 223 | +audioAsVoice: true, |
| 224 | +}); |
| 225 | + |
| 226 | +const result = await handleTtsCommands(buildTtsParams("/tts audio hello channel"), true); |
| 227 | +const reply = expectReply(result); |
| 228 | + |
| 229 | +expect(reply.mediaUrl).toBe("/tmp/channel-voice.ogg"); |
| 230 | +expect(reply.audioAsVoice).toBe(true); |
| 231 | +}); |
| 232 | + |
217 | 233 | it("treats bare /tts as status", async () => { |
218 | 234 | const result = await handleTtsCommands( |
219 | 235 | buildTtsParams("/tts", { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。