Bug type
Behavior bug (incorrect output/state without crash)
Summary
When messages.tts.auto: "inbound" is configured and a user sends a voice message on Matrix, the TTS reply audio is sent as a generic audio file attachment instead of a native voice message bubble (MSC3245). This is because "matrix" is not included in the VOICE_BUBBLE_CHANNELS set in src/tts/tts.ts.
Root Cause
In the TTS pipeline (src/tts/tts.ts):
const VOICE_BUBBLE_CHANNELS = new Set([
"telegram",
"feishu",
"whatsapp",
]);
Matrix is missing from this set. This causes two cascading issues:
resolveOutputFormat("matrix") returns DEFAULT_OUTPUT with openai: "mp3" and voiceCompatible: false instead of TELEGRAM_OUTPUT with openai: "opus" and voiceCompatible: true
- The reply dispatcher sets
audioAsVoice: result.voiceCompatible === true → false, so the Matrix send pipeline never applies MSC3245 voice metadata
Even though extensions/matrix/src/matrix/send.ts fully supports audioAsVoice and correctly injects org.matrix.msc3245.voice + org.matrix.msc1767.audio, the TTS pipeline never sets this flag for Matrix.
Steps to reproduce
- Configure
messages.tts.auto: "inbound" and an OpenAI-compatible TTS provider
- Send a voice message to the bot on Matrix (Element)
- Bot transcribes, generates a reply, and runs TTS
- TTS audio is sent as a generic file attachment, not a voice bubble
Expected behavior
TTS replies on Matrix should:
- Use Opus format (like Telegram/Feishu/WhatsApp)
- Set
voiceCompatible: true
- Be sent as MSC3245 voice message bubbles with waveform, duration, and inline playback
Actual behavior
TTS replies on Matrix:
- Use MP3 format (
DEFAULT_OUTPUT)
- Set
voiceCompatible: false
- Appear as downloadable file attachments without inline playback
Suggested fix
Add "matrix" to VOICE_BUBBLE_CHANNELS:
const VOICE_BUBBLE_CHANNELS = new Set([
"telegram",
"feishu",
"whatsapp",
"matrix", // Matrix supports MSC3245 voice messages
]);
This would make the TTS pipeline use Opus format and set voiceCompatible: true for Matrix, enabling native voice bubbles.
Related issues
Environment
- OpenClaw version: 2026.3.1
- Channel: Matrix (Element Web/Desktop)
- TTS provider: OpenAI-compatible (custom endpoint)
Impact
- Affected: All Matrix users receiving TTS auto-replies
- Severity: Medium — voice reply works but UX is poor (file download vs inline playback)
- Frequency: 100% for Matrix TTS replies
Bug type
Behavior bug (incorrect output/state without crash)
Summary
When
messages.tts.auto: "inbound"is configured and a user sends a voice message on Matrix, the TTS reply audio is sent as a generic audio file attachment instead of a native voice message bubble (MSC3245). This is because"matrix"is not included in theVOICE_BUBBLE_CHANNELSset insrc/tts/tts.ts.Root Cause
In the TTS pipeline (
src/tts/tts.ts):Matrix is missing from this set. This causes two cascading issues:
resolveOutputFormat("matrix")returnsDEFAULT_OUTPUTwithopenai: "mp3"andvoiceCompatible: falseinstead ofTELEGRAM_OUTPUTwithopenai: "opus"andvoiceCompatible: trueaudioAsVoice: result.voiceCompatible === true→false, so the Matrix send pipeline never applies MSC3245 voice metadataEven though
extensions/matrix/src/matrix/send.tsfully supportsaudioAsVoiceand correctly injectsorg.matrix.msc3245.voice+org.matrix.msc1767.audio, the TTS pipeline never sets this flag for Matrix.Steps to reproduce
messages.tts.auto: "inbound"and an OpenAI-compatible TTS providerExpected behavior
TTS replies on Matrix should:
voiceCompatible: trueActual behavior
TTS replies on Matrix:
DEFAULT_OUTPUT)voiceCompatible: falseSuggested fix
Add
"matrix"toVOICE_BUBBLE_CHANNELS:This would make the TTS pipeline use Opus format and set
voiceCompatible: truefor Matrix, enabling native voice bubbles.Related issues
sendMediaadapter missingaudioAsVoicepass-through (different layer)messagetool ignoresaudioAsVoiceparameter #32489 —messagetoolaudioAsVoicenot wired to Matrix (different layer)messagetoolEnvironment
Impact