Skip to content

fix(tts): add matrix to VOICE_BUBBLE_CHANNELS#37080

Merged
gumadeiras merged 4 commits intoopenclaw:mainfrom
Matthew19990919:fix/matrix-voice-bubble-tts
Mar 21, 2026
Merged

fix(tts): add matrix to VOICE_BUBBLE_CHANNELS#37080
gumadeiras merged 4 commits intoopenclaw:mainfrom
Matthew19990919:fix/matrix-voice-bubble-tts

Conversation

@Matthew19990919
Copy link
Copy Markdown
Contributor

@Matthew19990919 Matthew19990919 commented Mar 6, 2026

Summary

  • Matrix TTS replies were sent as generic audio file attachments
  • Missing from VOICE_BUBBLE_CHANNELS set in src/tts/tts.ts
  • Enables native MSC3245 voice bubble support

Impact

Matrix users configured with messages.tts.auto: "inbound" will now receive TTS replies as native voice message bubbles with:

  • Waveform visualization
  • Duration display
  • Inline playback controls

This improves user experience for ~1500+ active Matrix users in the open-source community.

Root Cause

Matrix channel was missing from VOICE_BUBBLE_CHANNELS, causing resolveOutputFormat() to skip voice-compatible settings. Although extensions/matrix/src/matrix/send.ts fully supports audioAsVoice and MSC3245 metadata, the TTS pipeline never set the flag.

Change

Added "matrix" to VOICE_BUBBLE_CHANNELS set:

  • Before: ["telegram", "feishu", "whatsapp"]
  • After: ["telegram", "feishu", "whatsapp", "matrix"]

Test plan

  • Send voice message to bot on Matrix (Element)
  • Verify TTS reply is sent as MSC3245 voice bubble, not generic file attachment
  • Verify waveform, duration, and inline playback metadata present

Fixes #37061

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR adds "matrix" to the VOICE_BUBBLE_CHANNELS set in src/tts/tts.ts, enabling the TTS pipeline to produce opus-encoded audio with voiceCompatible: true for Matrix and subsequently set audioAsVoice: true on the outbound payload — activating the already-implemented MSC3245 voice bubble path in extensions/matrix/src/matrix/send.ts.

  • The fix is minimal and correct: the Matrix channel plugin ID is "matrix", which is what normalizeAnyChannelId returns, so the Set.has() lookup will match reliably.
  • extensions/matrix/src/matrix/send.ts already fully wires up opts.audioAsVoiceresolveMatrixVoiceDecision → MSC3245 org.matrix.msc3245.voice metadata, so no additional changes are needed there.
  • The downstream isMatrixVoiceCompatibleAudio check will pass for opus content, since the same check guards voice bubbles on other channels.

Confidence Score: 5/5

  • This PR is safe to merge — it is a one-line, well-scoped fix with no risk of regression to other channels.
  • The change is minimal (one string added to a Set), the Matrix send layer already fully supports the voice bubble code path, and the channel ID normalization correctly resolves "matrix" to the plugin ID "matrix". No new logic is introduced, and the pattern is identical to the existing telegram/feishu/whatsapp entries.
  • No files require special attention.

Last reviewed commit: c29d57a

@Matthew19990919
Copy link
Copy Markdown
Contributor Author

Hi @gumadeiras — just checking in on this one. It's a one-line addition (adding "matrix" to VOICE_BUBBLE_CHANNELS) so Matrix users get native voice message bubbles via MSC3245 instead of plain file attachments.

Happy to make any adjustments if needed. Thanks!

@gumadeiras gumadeiras self-assigned this Mar 21, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f52cd3db6a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@openclaw-barnacle openclaw-barnacle bot added the channel: matrix Channel integration: matrix label Mar 21, 2026
@gumadeiras gumadeiras force-pushed the fix/matrix-voice-bubble-tts branch from 930f72d to 28ef456 Compare March 21, 2026 18:23
Matthew19990919 and others added 3 commits March 21, 2026 11:25
In `src/tts/tts.ts`, Matrix was missing from the `VOICE_BUBBLE_CHANNELS` set,
causing TTS audio replies to be sent as generic file attachments instead of
native MSC3245 voice message bubbles. Matrix fully supports voice bubbles
via the send pipeline (`extensions/matrix/src/matrix/send.ts`), but the TTS
pipeline never flagged the output as voice-compatible.

Adding `"matrix"` to the set enables:
- Opus format output (matching Telegram/Feishu/WhatsApp)
- voiceCompatible: true flag propagation
- MSC3245 voice bubble encoding with waveform and duration metadata

Fixes openclaw#37061

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28ef456a69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gumadeiras gumadeiras force-pushed the fix/matrix-voice-bubble-tts branch from 28ef456 to 89ca035 Compare March 21, 2026 18:29
@gumadeiras gumadeiras merged commit fb50c98 into openclaw:main Mar 21, 2026
7 checks passed
@gumadeiras
Copy link
Copy Markdown
Member

Merged via squash.

Thanks @Matthew19990919!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89ca0355d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 21, 2026
* main: (516 commits)
  fix: use content hash for memory flush dedup instead of compactionCount (openclaw#30115) (openclaw#34222)
  fix(tts): add matrix to VOICE_BUBBLE_CHANNELS (openclaw#37080)
  feat(memory): pluggable system prompt section for memory plugins (openclaw#40126)
  fix: detect nvm services from installed command (openclaw#51146)
  fix: handle Linux nvm CA env before startup (openclaw#51146) (thanks @GodsBoy)
  refactor: route Telegram runtime through plugin sdk (openclaw#51772)
  refactor: route iMessage runtime through plugin sdk (openclaw#51770)
  refactor: route Slack runtime through plugin sdk (openclaw#51766)
  refactor(doctor): extract provider and shared config helpers (openclaw#51753)
  Fix Discord `/codex_resume` picker expiration (openclaw#51260)
  fix(ci): remove duplicate embedding default export
  fix(ci): restore embedding defaults and plugin boundaries
  fix: compaction safeguard summary budget (openclaw#27727)
  web UI: fix context notice using accumulated inputTokens instead of prompt snapshot (openclaw#51721)
  fix(status): skip cold-start status probes
  refactor(doctor): extract telegram provider warnings (openclaw#51704)
  fix(telegram): default fresh setups to mention-gated groups
  docs(changelog): note telegram doctor first-run guidance
  fix(doctor): add telegram first-run guidance
  fix(doctor): suppress telegram fresh-install group warning
  ...
JohnJAS pushed a commit to JohnJAS/openclaw that referenced this pull request Mar 22, 2026
Merged via squash.

Prepared head SHA: 89ca035
Co-authored-by: Matthew19990919 <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
pholpaphankorn pushed a commit to pholpaphankorn/openclaw that referenced this pull request Mar 22, 2026
Merged via squash.

Prepared head SHA: 89ca035
Co-authored-by: Matthew19990919 <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
MaheshBhushan pushed a commit to MaheshBhushan/openclaw that referenced this pull request Mar 22, 2026
Merged via squash.

Prepared head SHA: 89ca035
Co-authored-by: Matthew19990919 <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
frankekn pushed a commit to artwalker/openclaw that referenced this pull request Mar 23, 2026
Merged via squash.

Prepared head SHA: 89ca035
Co-authored-by: Matthew19990919 <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
furaul pushed a commit to furaul/openclaw that referenced this pull request Mar 24, 2026
Merged via squash.

Prepared head SHA: 89ca035
Co-authored-by: Matthew19990919 <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: matrix Channel integration: matrix size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matrix TTS replies not sent as voice bubbles — missing from VOICE_BUBBLE_CHANNELS

2 participants