Problem
When the AI sends an audio file (e.g., TTS output) to a WeChat user via openclaw-weixin, the file is sent as a generic file attachment (FILE type). Users receive a .mp3/.wav file rather than a playable WeChat voice message.
Expected Behavior
The plugin should support sending voice messages using WeChat's native VOICE message type (MessageItemType.VOICE: 3), so users receive a voice message they can play inline, identical to how humans send voice notes.
Plugin Version
- Plugin:
@tencent-weixin/openclaw-weixin v2.1.3
- OpenClaw: 2026.4.1+
Analysis
The plugin's send-media.ts already handles:
video/* → sendVideoMessageWeixin + UploadMediaType.VIDEO: 2
image/* → sendImageMessageWeixin + UploadMediaType.IMAGE: 1
- generic files →
sendFileMessageWeixin + UploadMediaType.FILE: 3
Audio files (audio/*) currently fall through to the generic file handler. A sendVoiceMessageWeixin function and corresponding upload path using UploadMediaType.VOICE: 4 would need to be added in send-media.ts, similar to the existing video/image patterns.
Additional Context
The WeChat API supports VOICE message type (MessageItemType.VOICE: 3). The upstream CDN upload and message sending infrastructure already exists in the plugin — only the voice-specific routing and VoiceItem construction are missing.
Problem
When the AI sends an audio file (e.g., TTS output) to a WeChat user via
openclaw-weixin, the file is sent as a generic file attachment (FILE type). Users receive a.mp3/.wavfile rather than a playable WeChat voice message.Expected Behavior
The plugin should support sending voice messages using WeChat's native VOICE message type (
MessageItemType.VOICE: 3), so users receive a voice message they can play inline, identical to how humans send voice notes.Plugin Version
@tencent-weixin/openclaw-weixinv2.1.3Analysis
The plugin's
send-media.tsalready handles:video/*→sendVideoMessageWeixin+UploadMediaType.VIDEO: 2image/*→sendImageMessageWeixin+UploadMediaType.IMAGE: 1sendFileMessageWeixin+UploadMediaType.FILE: 3Audio files (
audio/*) currently fall through to the generic file handler. AsendVoiceMessageWeixinfunction and corresponding upload path usingUploadMediaType.VOICE: 4would need to be added insend-media.ts, similar to the existing video/image patterns.Additional Context
The WeChat API supports VOICE message type (MessageItemType.VOICE: 3). The upstream CDN upload and message sending infrastructure already exists in the plugin — only the voice-specific routing and
VoiceItemconstruction are missing.