openclaw - ✅(Solved) Fix [Bug]: TTS audio sent as file attachment instead of voice message in Feishu [3 pull requests, 2 comments, 3 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#59588Fetched 2026-04-08 02:42:51
View on GitHub
Comments
2
Participants
3
Timeline
11
Reactions
0
Timeline (top)
cross-referenced ×4referenced ×3commented ×2labeled ×2

TTS audio is delivered as MP3 file attachment instead of clickable voice message in Feishu.

Root Cause

TTS audio is delivered as MP3 file attachment instead of clickable voice message in Feishu.

Fix Action

Fixed

PR fix notes

PR #59602: fix: send TTS audio as voice message in Feishu

Description (problem / solution / changelog)

Summary

Add .mp3 and audio/mpeg detection in resolveFeishuOutboundMediaKind() so that TTS-generated audio files (typically .mp3) are sent as voice messages instead of file attachments in Feishu.

Changes

  • extensions/feishu/src/media.ts: Added .mp3 extension and audio/mpeg contentType to audio detection in resolveFeishuOutboundMediaKind()

Testing

Verified the fix locally by reviewing the updated code - the function now correctly identifies .mp3 and audio/mpeg as audio type.

Fixes openclaw/openclaw#59588

Changed files

  • extensions/feishu/src/media.ts (modified, +3/-1)

PR #59619: fix(feishu): send TTS audio as voice message instead of file attachment (#59588)

Description (problem / solution / changelog)

Summary

TTS audio is sent as a file attachment instead of a clickable voice message bubble in Feishu because the audioAsVoice flag from the outbound context is not propagated to the Feishu media routing logic.

Root Cause

The Feishu sendMedia adapter (outbound.ts) did not destructure audioAsVoice from the ChannelOutboundContext, so sendMediaFeishu and resolveFeishuOutboundMediaKind never saw the flag. When TTS generates MP3 audio with audioAsVoice: true, resolveFeishuOutboundMediaKind classified it as msgType: "file" (generic file attachment) instead of msgType: "audio" (voice message bubble).

Changes

  • extensions/feishu/src/outbound.ts: destructure audioAsVoice from outbound context, pass it to sendMediaFeishu
  • extensions/feishu/src/media.ts: add audioAsVoice parameter to sendMediaFeishu and resolveFeishuOutboundMediaKind; when audioAsVoice is true and file is audio (mp3/wav/m4a/aac), force msgType: "audio"
  • extensions/feishu/src/media.test.ts: add regression tests for mp3 with/without audioAsVoice

Test

pnpm test -- extensions/feishu/src/media.test.ts -t "msg_type"  # 20 passed
pnpm test -- extensions/feishu/src/outbound.test.ts             # 18 passed

Closes #59588

Changed files

  • extensions/feishu/src/media.test.ts (modified, +31/-0)
  • extensions/feishu/src/media.ts (modified, +18/-3)
  • extensions/feishu/src/outbound.ts (modified, +2/-0)

PR #59652: fix(microsoft-tts): default to Opus output format for voice message compatibility

Description (problem / solution / changelog)

Fixes #59588

Problem

TTS audio from Microsoft provider is delivered as MP3 file attachment instead of clickable voice message in Feishu (and likely Telegram/WhatsApp/Matrix). Users must download the file and play it manually.

Root Cause

The default Edge TTS output format is audio-24khz-48kbitrate-mono-mp3, which produces .mp3 files. The Feishu channel's media classification (resolveFeishuOutboundMediaKind) only treats .opus and .ogg as audio voice messages; MP3 files are sent as generic file attachments.

Additionally, isVoiceCompatibleAudio() in src/media/audio.ts checks for Telegram voice formats (ogg, opus, m4a) but not mp3.

Fix

Change DEFAULT_EDGE_OUTPUT_FORMAT from audio-24khz-48kbitrate-mono-mp3 to audio-24khz-48kbitrate-mono-opus. This ensures TTS audio is sent as Opus format, which is compatible with voice message features on all channels in OPUS_CHANNELS (Telegram, Feishu, WhatsApp, Matrix).

Test Plan

  • Microsoft TTS tests pass (11/11)
  • Manual testing: enable Microsoft TTS with Feishu, verify audio is sent as voice message (clickable bubble) not file attachment

Changed files

  • src/agents/tools/sessions-send-tool.ts (modified, +15/-12)
  • src/infra/exec-approvals-persist.test.ts (added, +142/-0)
  • src/infra/exec-approvals.ts (modified, +30/-3)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

TTS audio is delivered as MP3 file attachment instead of clickable voice message in Feishu.

Steps to reproduce

  1. Enable TTS in OpenClaw (messages.tts.auto: always, provider: microsoft)
  2. Send any message via Feishu channel
  3. The agent replies with text AND an MP3 audio file attachment
  4. The audio appears as a downloadable file, not a clickable voice message

Expected behavior

TTS audio should be sent as a Feishu voice message (clickable audio bubble), not as an MP3 file attachment. According to the TTS documentation, Feishu should receive Opus voice messages.

Actual behavior

The TTS audio is delivered as an MP3 file attachment in Feishu chat. Users must download the file and play it manually, rather than tapping to play like native Feishu voice messages.

OpenClaw version

2026.3.28

Operating system

Windows 11

Install method

npm global

Model

minimax/MiniMax-M2.7

Provider / routing chain

openclaw -> feishu (channel) -> minimax (model provider)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: Feishu channel users with TTS enabled Severity: Annoying (degrades user experience) Frequency: Always (100% of TTS replies) Consequence: Users receive MP3 files instead of voice messages, requiring manual download and play instead of tap-to-play

Additional information

The TTS documentation states that Feishu should send Opus voice messages. The Feishu plugin has both sendVoice and sendFile APIs available, but TTS audio appears to be routed through sendFile instead of sendVoice. The TTS provider in use is Microsoft Edge TTS (microsoft).

extent analysis

TL;DR

Investigate and adjust the routing of TTS audio in the Feishu plugin to utilize the sendVoice API instead of sendFile for delivering Opus voice messages.

Guidance

  • Review the Feishu plugin's implementation to ensure it correctly handles TTS audio and uses the sendVoice API for Opus voice messages.
  • Verify the Microsoft Edge TTS provider is configured to output Opus audio format, which is compatible with Feishu's voice message feature.
  • Check the OpenClaw configuration, specifically the messages.tts.auto and provider settings, to confirm they are set up to work with the Feishu channel and Microsoft TTS provider.
  • Test the TTS feature with a different provider or model to isolate if the issue is specific to the Microsoft Edge TTS or the Feishu plugin.

Example

No specific code example is provided due to the lack of implementation details in the issue.

Notes

The solution may require adjustments to the Feishu plugin or the OpenClaw configuration, and it is uncertain whether the issue lies within the plugin, the TTS provider, or the OpenClaw setup.

Recommendation

Apply a workaround by modifying the Feishu plugin to use the sendVoice API for TTS audio, as this is the most direct approach to resolving the issue based on the provided information.

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…

FAQ

Expected behavior

TTS audio should be sent as a Feishu voice message (clickable audio bubble), not as an MP3 file attachment. According to the TTS documentation, Feishu should receive Opus voice messages.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING