openclaw - 💡(How to fix) Fix Feishu native audio transcode fails due to .part suffix in safe-write temp path

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…

When OpenClaw sends TTS audio as a Feishu native voice bubble, the audioAsVoice transcode step (MP3 to Opus/OGG via ffmpeg) always fails because the safe-write mechanism appends a .part suffix to the output path, and ffmpeg cannot determine the muxer from that extension.

As a result, native audio bubbles are never delivered -- the audio falls back to a file attachment every time.

Error Message

Error initializing the muxer: Invalid argument

Root Cause

buildSiblingTempPath() in fs-safe-DpJlqO1z.js (line 681) constructs a temp path with .part suffix:

return path.join(path.dirname(params.targetPath), `${safePrefix}${id}-${safeTail}.part`);

This produces paths like voice.ogg.part. ffmpeg receives this as the output file and fails muxer initialization because the extension is .part. Even though -f ogg is passed, ffmpeg still fails:

Unable to choose an output format for '...voice.ogg.part'
Error initializing the muxer: Invalid argument

When transcoding fails, the audio is sent as a file attachment instead of a native voice bubble.

Code Example

return path.join(path.dirname(params.targetPath), `${safePrefix}${id}-${safeTail}.part`);

---

Unable to choose an output format for '...voice.ogg.part'
Error initializing the muxer: Invalid argument

---

const outputPath = path.join(workspace.dir, FEISHU_VOICE_FILE_NAME);
await runFfmpeg([..., outputPath]);
RAW_BUFFERClick to expand / collapse

Summary

When OpenClaw sends TTS audio as a Feishu native voice bubble, the audioAsVoice transcode step (MP3 to Opus/OGG via ffmpeg) always fails because the safe-write mechanism appends a .part suffix to the output path, and ffmpeg cannot determine the muxer from that extension.

As a result, native audio bubbles are never delivered -- the audio falls back to a file attachment every time.

Environment

  • OpenClaw: v2026.5.18
  • OS: Ubuntu 24.04 (x64), Node v24.15.0
  • ffmpeg: 6.1.1-3ubuntu5
  • Channel: Feishu WebSocket

Root Cause

buildSiblingTempPath() in fs-safe-DpJlqO1z.js (line 681) constructs a temp path with .part suffix:

return path.join(path.dirname(params.targetPath), `${safePrefix}${id}-${safeTail}.part`);

This produces paths like voice.ogg.part. ffmpeg receives this as the output file and fails muxer initialization because the extension is .part. Even though -f ogg is passed, ffmpeg still fails:

Unable to choose an output format for '...voice.ogg.part'
Error initializing the muxer: Invalid argument

When transcoding fails, the audio is sent as a file attachment instead of a native voice bubble.

Proposed Fix

In transcodeToFeishuVoiceOpus() (send-CSxIglbb.js), replace writeExternalFileWithinRoot() with a direct write to the workspace temp dir which is already scoped and cleaned up:

const outputPath = path.join(workspace.dir, FEISHU_VOICE_FILE_NAME);
await runFfmpeg([..., outputPath]);

This bypasses the safe-write wrapper for the ffmpeg output, avoiding the .part suffix entirely.

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 Feishu native audio transcode fails due to .part suffix in safe-write temp path