Skip to content

[Bug] MEDIA: directive delivers audio attachment twice on Telegram (duplicate voice notes) #65468

Description

@esterne

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When an agent sends a voice note via the MEDIA: directive with an MP3 file on Telegram, the audio is delivered twice — once as a file attachment and once as a voice note. The recipient sees two separate messages containing the same audio.

Steps to reproduce

  1. Configure Microsoft TTS with en-GB-ThomasNeural on OpenClaw 2026.4.11
  2. Set messages.tts.auto to "off" (to isolate the MEDIA path from the auto-TTS path)
  3. Generate an MP3 file using node-edge-tts and save to ~/.openclaw/workspace/.openclaw/media/voice-reply.mp3
  4. Reply with MEDIA:.openclaw/media/voice-reply.mp3 as the only content
  5. Observe: two separate Telegram messages are received — one as a file attachment, one as a voice note

Expected behavior

A single voice note should be delivered.

Actual behavior

Two identical audio messages are delivered to the Telegram chat:

  1. First: appears as a media file attachment
  2. Second: appears as a native Telegram voice note

Workaround

We worked around this by bypassing OpenClaw's MEDIA delivery entirely and calling the Telegram Bot API directly via curl -F "voice=@file" sendVoice, which delivers a single voice note correctly.

Related issues

Additional context

  • This was reproduced on macOS (Apple Silicon), OpenClaw 2026.4.11, Telegram channel
  • The duplicate delivery happens regardless of whether [[audio_as_voice]] tag is included
  • The tts tool output is also blocked by the /tmp path issue (fix(tts): allow OpenClaw temp directory paths in reply media normalizer #63511), but even when using workspace paths that ARE allowed, the MEDIA directive causes duplication
  • Voice: en-GB-ThomasNeural, format: audio-24khz-48kbitrate-mono-mp3

Environment

  • OpenClaw: 2026.4.11 (769908e)
  • OS: macOS 26.4.1 (arm64)
  • Channel: Telegram
  • TTS: Microsoft Edge (node-edge-tts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions