openclaw - 💡(How to fix) Fix [Feature]: [Feishu] Support voice message bubbles with asVoice [3 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#51578Fetched 2026-04-08 01:09:29
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Timeline (top)
commented ×3mentioned ×2subscribed ×2labeled ×1

Add support for sending voice messages in Feishu channels using the asVoice parameter. Currently, when sending audio files to Feishu via the message tool, they are sent as audio attachments rather than native voice messages.

Root Cause

Add support for sending voice messages in Feishu channels using the asVoice parameter. Currently, when sending audio files to Feishu via the message tool, they are sent as audio attachments rather than native voice messages.

RAW_BUFFERClick to expand / collapse

Summary

Add support for sending voice messages in Feishu channels using the asVoice parameter. Currently, when sending audio files to Feishu via the message tool, they are sent as audio attachments rather than native voice messages.

Problem to solve

na

Proposed solution

Feature Request: Feishu Voice Message Support (asVoice)

Feature Description

Add support for sending voice messages in Feishu channels using the asVoice parameter. Currently, when sending audio files to Feishu via the message tool, they are sent as audio attachments rather than native voice messages.

Use Case

When using TTS (Text-to-Speech) with Feishu, users expect to receive voice messages that:

  • Display as voice message bubbles (not audio file attachments)
  • Allow inline playback without downloading
  • Provide a better chat experience

Current Behavior

When sending audio via message(action=send, channel=feishu, media="audio.mp3", asVoice=true):

  • The asVoice parameter appears to be ignored
  • Audio is sent as an audio file attachment
  • No voice message bubble is displayed

Expected Behavior

When asVoice=true is specified:

  • Audio should be sent as a Feishu voice message (using Feishu's audio/voice API)
  • Display as a playable voice message bubble
  • Compatible with TTS output from Edge TTS, OpenAI, or ElevenLabs

Technical Notes

Feishu supports voice messages via the audio message type in their API:

  • Message type: audio
  • Requires: file_key to the uploaded audio resource
  • Audio format: AMR or OGG recommended

Reference: Feishu Message API - Audio Messages

Implementation Suggestion

In the OpenClaw Feishu plugin (send.ts or media.ts):

  1. Check for asVoice flag in message options
  2. If asVoice=true, use Feishu's audio message type instead of file
  3. Ensure proper audio format conversion if needed (MP3 → AMR/OGG)

Alternatives Considered

None - this is the expected behavior for voice messages in messaging apps.

Priority

Medium - Enhances user experience for TTS functionality on Feishu.

feishu-voice-feature-request.md

Alternatives considered

No response

Impact

Medium - Enhances user experience for TTS functionality on Feishu.

Evidence/examples

No response

Additional information

No response

extent analysis

Fix Plan

To add support for sending voice messages in Feishu channels, follow these steps:

  • Modify the send.ts or media.ts file in the OpenClaw Feishu plugin to check for the asVoice flag in message options.
  • If asVoice=true, use Feishu's audio message type instead of file.
  • Ensure proper audio format conversion if needed (e.g., MP3 to AMR or OGG).

Example code:

// Check for asVoice flag
if (messageOptions.asVoice) {
  // Use Feishu's audio message type
  const messageType = 'audio';
  const fileKey = uploadAudioToFeishu(messageOptions.media);
  const message = {
    msg_type: messageType,
    content: {
      file_key: fileKey,
    },
  };
  // Send the audio message
  sendFeishuMessage(message);
} else {
  // Send as file attachment (current behavior)
  const message = {
    msg_type: 'file',
    content: {
      file_key: uploadFileToFeishu(messageOptions.media),
    },
  };
  sendFeishuMessage(message);
}

// Upload audio to Feishu and get the file key
function uploadAudioToFeishu(audioFile: string): string {
  // Convert audio format if needed (e.g., MP3 to AMR or OGG)
  const convertedAudio = convertAudioFormat(audioFile);
  // Upload the converted audio to Feishu
  const fileKey = uploadFileToFeishu(convertedAudio);
  return fileKey;
}

// Convert audio format (e.g., MP3 to AMR or OGG)
function convertAudioFormat(audioFile: string): string {
  // Implement audio format conversion logic here
  // For example, using a library like ffmpeg
  const convertedAudio = ffmpeg.convert(audioFile, 'amr');
  return convertedAudio;
}

Verification

To verify that the fix worked, test sending a voice message with the asVoice=true flag and check that:

  • The message is displayed as a playable voice message bubble in Feishu.
  • The audio can be played inline without downloading.
  • The message is compatible with TTS output from Edge TTS, OpenAI, or ElevenLabs.

Extra Tips

  • Make sure to handle errors and exceptions properly when uploading and sending audio messages.
  • Consider adding logging and monitoring to track the success and failure rates of voice message sending.
  • Keep in mind that Feishu's API may have usage limits and requirements for audio message sending, so be sure to review their documentation and terms of service.

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