Skip to content

[Bug] TTS tool generates empty (0-byte) MP3 files #43229

@JingkaiTang

Description

@JingkaiTang

Bug Description

The tts tool creates MP3 files but they are empty (0 bytes). The audio file is not delivered to Telegram.

Environment

  • OpenClaw version: 2026.3.8 (3caab92)
  • OS: Linux (CachyOS, kernel 6.19.6-2-cachyos)
  • Node: v25.6.1
  • Channel: Telegram

Steps to Reproduce

  1. In a Telegram DM with OpenClaw, agent uses tts tool
  2. Observe that a voice message is sent but contains no audio (or fails silently)

Evidence

TTS tool creates empty files:

/tmp/openclaw/tts-CJ48ow/:
-rw-r--r-- 1 t7kai t7kai   0  3月11日 21:45 voice-1773236725758.mp3

Direct node-edge-tts CLI works correctly:

$ npx node-edge-tts -t "你好测试" -f /tmp/test-tts.mp3 -v zh-CN-XiaoxiaoNeural
Converted to /tmp/test-tts.mp3

$ ls -la /tmp/test-tts.mp3
-rw-r--r-- 1 t7kai t7kai 9648  3月11日 21:46 /tmp/test-tts.mp3

Expected Behavior

TTS tool should generate valid MP3 audio and deliver it to the Telegram chat.

Actual Behavior

TTS tool creates a 0-byte MP3 file. The file is empty and no audio is played.

Additional Context

  • Chinese voice tested: zh-CN-XiaoxiaoNeural
  • node-edge-tts npm package version: 1.2.10
  • The underlying node-edge-tts library works fine when called directly via CLI
  • Issue appears to be in how OpenClaw invokes the TTS internally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions