openclaw - 💡(How to fix) Fix [Bug]: Feishu voice message sent via message tool does not display audio duration [1 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#53798Fetched 2026-04-08 01:23:18
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

When sending voice messages to Feishu via the message tool with media (opus file), the message is sent successfully as a voice message, but the duration is not displayed in the Feishu UI. The voice message appears without the usual "X:XX" duration indicator.

Root Cause

When sending voice messages to Feishu via the message tool with media (opus file), the message is sent successfully as a voice message, but the duration is not displayed in the Feishu UI. The voice message appears without the usual "X:XX" duration indicator.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When sending voice messages to Feishu via the message tool with media (opus file), the message is sent successfully as a voice message, but the duration is not displayed in the Feishu UI. The voice message appears without the usual "X:XX" duration indicator.

Steps to reproduce

  1. Generate an audio file (e.g., using mmvoice-maker, converted to opus via ffmpeg)
  2. Send via message tool:
  • action: send
  • channel: feishu
  • target: user:ou_xxx
  • media: /absolute/path/to/audio.opus
  1. The audio is received as a voice message in Feishu, but with no duration shown

Expected behavior

The voice message should display the audio duration (e.g., "1:23") in the Feishu chat, just like when a user records and sends a voice message manually.

Actual behavior

The voice message is sent successfully to Feishu as an audio message, but no duration is displayed. In the Feishu chat, it appears as a voice message without the usual "X:XX" duration indicator shown below the message.

OpenClaw version

2026.3.23

Operating system

ubuntu24.04

Install method

npm

Model

minimax

Provider / routing chain

openclaw-minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To fix the issue of the voice message duration not being displayed in Feishu, we need to modify the message tool to include the duration of the audio file in the request.

Step-by-Step Solution

  • Calculate the duration of the audio file using a library like ffmpeg.
  • Modify the message tool to include the duration in the request payload.
  • Update the Feishu API request to include the duration parameter.

Example Code

import subprocess

# Calculate the duration of the audio file
def calculate_duration(file_path):
    command = f"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {file_path}"
    output = subprocess.check_output(command, shell=True)
    duration = float(output.decode('utf-8').strip())
    return duration

# Modify the message tool to include the duration
def send_message(media_path):
    duration = calculate_duration(media_path)
    # Convert duration to MM:SS format
    minutes, seconds = divmod(duration, 60)
    duration_str = f"{int(minutes):02d}:{int(seconds):02d}"
    # Update the request payload with the duration
    payload = {
        "action": "send",
        "channel": "feishu",
        "target": "user:ou_xxx",
        "media": media_path,
        "duration": duration_str
    }
    # Send the request to Feishu API
    # ...

Verification

To verify that the fix worked, send a voice message using the modified message tool and check if the duration is displayed in the Feishu chat.

Extra Tips

  • Make sure to handle errors and exceptions when calculating the duration and sending the request.
  • Test the modified message tool with different audio file formats and durations to ensure it works correctly.

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

The voice message should display the audio duration (e.g., "1:23") in the Feishu chat, just like when a user records and sends a voice message manually.

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 [Bug]: Feishu voice message sent via message tool does not display audio duration [1 participants]