Bug type
Behavior bug (incorrect output/state without crash)
Summary
The message tool's audioAsVoice parameter is not wired to the Matrix channel plugin, causing audio files to be sent as generic m.file attachments instead of m.audio voice messages (MSC3245).
Steps to reproduce
- Configure Matrix channel (already ON/OK)
- Generate OGG/Opus audio file:
curl -X POST http://localhost:8877/v1/audio/speech -d '{"input":"test","voice":"af_heart","response_format":"opus"}' -o voice.ogg
- Send via
message tool with voice flag: { "action": "send", "channel": "matrix", "media": "./voice.ogg", "mimeType": "audio/ogg; codecs=opus", "asVoice": true }
- Try alternate parameter:
{ "audioAsVoice": true }
Expected behavior
Audio should appear as an inline voice message bubble (playable inline) using MSC3245 format with org.matrix.msc3245.voice metadata and duration info.
Actual behavior
Audio appears as a file attachment (downloadable file) instead of inline voice player. Matrix event shows msgtype: "m.file" instead of msgtype: "m.audio" with voice metadata.
OpenClaw version
2026.3.1
Operating system
Linux 6.12.48+deb13-amd64 (Docker)
Install method
No response
Logs, screenshots, and evidence
| Test | Parameter | Result |
|------|-----------|--------|
| Test 1 | `asVoice: true` | ❌ File attachment |
| Test 2 | `audioAsVoice: true` | ❌ File attachment |
| Test 3 | Various `mimeType` combos | ❌ File attachment |
| Test 4 | Resend user's own voice file via `media` | ❌ File attachment |
| Control | User's file sent natively from Element | ✅ Inline voice player |
Matrix plugin (`send.ts`, `media.ts`) supports `audioAsVoice` internally and injects proper MSC3245 metadata, but the `message` tool abstraction layer doesn't pass this parameter to the channel.
Impact and severity
- Affected: Matrix users wanting voice message automation
- Severity: Medium (feature gap — voice messages technically supported but inaccessible)
- Frequency: 100% repro when using
message tool
- Consequence: Cannot send voice messages programmatically; workaround requires browser automation or manual Element client use
- Not a regression: Feature appears never to have been wired through tool layer
Additional information
Related code locations:
- Matrix plugin supports voice:
/extensions/matrix/src/matrix/send/media.ts (lines ~60-70 inject org.matrix.msc3245.voice)
message tool definition: Tool schema doesn't expose audioAsVoice for Matrix channel
Suggested fix: Either:
- Add
audioAsVoice parameter to message tool schema and wire to Matrix sendMedia() call
- Auto-detect opus/ogg audio and default to voice message format for Matrix
References:
Bug type
Behavior bug (incorrect output/state without crash)
Summary
The
messagetool'saudioAsVoiceparameter is not wired to the Matrix channel plugin, causing audio files to be sent as genericm.fileattachments instead ofm.audiovoice messages (MSC3245).Steps to reproduce
curl -X POST http://localhost:8877/v1/audio/speech -d '{"input":"test","voice":"af_heart","response_format":"opus"}' -o voice.oggmessagetool with voice flag:{ "action": "send", "channel": "matrix", "media": "./voice.ogg", "mimeType": "audio/ogg; codecs=opus", "asVoice": true }{ "audioAsVoice": true }Expected behavior
Audio should appear as an inline voice message bubble (playable inline) using MSC3245 format with
org.matrix.msc3245.voicemetadata and duration info.Actual behavior
Audio appears as a file attachment (downloadable file) instead of inline voice player. Matrix event shows
msgtype: "m.file"instead ofmsgtype: "m.audio"with voice metadata.OpenClaw version
2026.3.1
Operating system
Linux 6.12.48+deb13-amd64 (Docker)
Install method
No response
Logs, screenshots, and evidence
Impact and severity
messagetoolAdditional information
Related code locations:
/extensions/matrix/src/matrix/send/media.ts(lines ~60-70 injectorg.matrix.msc3245.voice)messagetool definition: Tool schema doesn't exposeaudioAsVoicefor Matrix channelSuggested fix: Either:
audioAsVoiceparameter tomessagetool schema and wire to MatrixsendMedia()callReferences:
send.test.ts(testsaudioAsVoicefunctionality at plugin level)