openclaw - 💡(How to fix) Fix TTS mode:final causes duplicate text message delivery on chat channels [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72830Fetched 2026-04-28 06:31:47
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
cross-referenced ×2commented ×1

When messages.tts.mode is set to "final", every assistant reply is delivered twice as two separate messages on chat channels (confirmed on webchat and Feishu). The first message contains text only, and the second (arriving 6-20 seconds later) contains the same text plus the TTS audio attachment. This makes it appear to the user that the bot is repeating itself.

Root Cause

When messages.tts.mode is set to "final", every assistant reply is delivered twice as two separate messages on chat channels (confirmed on webchat and Feishu). The first message contains text only, and the second (arriving 6-20 seconds later) contains the same text plus the TTS audio attachment. This makes it appear to the user that the bot is repeating itself.

Fix Action

Workaround

Disable auto TTS (messages.tts.enabled: false) and use the tts tool manually when voice output is needed.

Code Example

[503] id=0657b6c1 ts=2026-04-27T13:27:08.695Z role=assistant
     已更新。去飞书发条消息测试吧...

[504] id=d4ba053e ts=2026-04-27T13:27:14.690Z role=assistant
     已更新。去飞书发条消息测试吧...
RAW_BUFFERClick to expand / collapse

Description

When messages.tts.mode is set to "final", every assistant reply is delivered twice as two separate messages on chat channels (confirmed on webchat and Feishu). The first message contains text only, and the second (arriving 6-20 seconds later) contains the same text plus the TTS audio attachment. This makes it appear to the user that the bot is repeating itself.

Environment

  • OpenClaw: v2026.4.23 (a979721)
  • Model: zai/glm-5.1
  • TTS Provider: local-tts (Qwen3-TTS 1.7B 8-bit via mlx-audio)
  • Channel: webchat + Feishu
  • Config: messages.tts.enabled: true, messages.tts.mode: "final"

Evidence

Session JSONL shows two distinct assistant messages with different IDs and timestamps, but identical text content:

[503] id=0657b6c1 ts=2026-04-27T13:27:08.695Z role=assistant
     已更新。去飞书发条消息测试吧...

[504] id=d4ba053e ts=2026-04-27T13:27:14.690Z role=assistant
     已更新。去飞书发条消息测试吧...

The time delta (~6s, ~21s in other cases) corresponds exactly to the TTS synthesis duration.

Expected Behavior

In mode: "final", the text message should be delivered once, with the TTS audio appended to the same message (or sent as a separate voice-only message) rather than re-delivering the full text content a second time.

Suggested Fix

When TTS completes in mode: "final":

  • Option A: Replace the original text-only message with a text+audio message (edit-in-place)
  • Option B: Send only the audio attachment as a second message, without duplicating the text
  • Option C: Delay text delivery until TTS is ready, then send both together as a single message

Workaround

Disable auto TTS (messages.tts.enabled: false) and use the tts tool manually when voice output is needed.

extent analysis

TL;DR

Implement one of the suggested fixes (A, B, or C) to prevent duplicate text messages when messages.tts.mode is set to "final".

Guidance

  • Investigate the feasibility of each suggested fix option (A, B, or C) and choose the most suitable one based on the system's architecture and requirements.
  • Verify that the chosen fix does not introduce any new issues, such as delayed message delivery or audio quality problems.
  • Consider the workaround of disabling auto TTS and using the tts tool manually as a temporary solution until a permanent fix is implemented.
  • Review the session JSONL logs to ensure that the fix correctly handles message IDs and timestamps.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details.

Notes

The suggested fixes (A, B, or C) may require significant changes to the message handling logic, and their implementation may vary depending on the underlying system architecture.

Recommendation

Apply workaround by disabling auto TTS (messages.tts.enabled: false) until a permanent fix is implemented, as it provides a simple and temporary solution to prevent duplicate text messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix TTS mode:final causes duplicate text message delivery on chat channels [1 comments, 2 participants]