feat(telegram): [[audio_as_voice]] tag support#490
Merged
Conversation
Contributor
|
Hi, thank you for the PR. A few notes:
Also, is this PR effective in practice? AFAIK Telegram voice notes (with the waveforms that you mean) require ogg/opus, but we don’t transcode the audio the agent generates (unless that is specific to your workflow). How often will Clawdbot produce ogg/opus unless you add conversion? |
- Add [[audio_as_voice]] detection to splitMediaFromOutput() - Pass audioAsVoice through onBlockReply callback chain - Buffer audio blocks during streaming, flush at end with correct flag - Non-audio media still streams immediately - Fix: emit payloads with audioAsVoice flag even if text is empty Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
- Keep audioAsVoice-only payloads from being filtered out - Allow empty payloads through when they carry the flag - Remove temporary debug logs around audioAsVoice buffering Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
- Share voice compatibility decision logic across send + bot flows - Keep voice fallback logging consistent - Simplify voice handling in the audio send path
- Allow flag-only chunks so audio_as_voice propagates - Keep reply item scan aware of empty audio tag blocks Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
5015770 to
c56b2f4
Compare
Contributor
|
Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: c56b2f4\n- Merge commit: f4b3869\n\nThanks @jarvis-medmatic! |
25 tasks
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…ice-tag feat(telegram): `[[audio_as_voice]]` tag support
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…ice-tag feat(telegram): `[[audio_as_voice]]` tag support
franciscomaestre
added a commit
to franciscomaestre/openclaw
that referenced
this pull request
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
[[audio_as_voice]]tag that makes audio blocks in Telegram responses render as voice notes instead of audio files.Changes:
[[audio_as_voice]]tag insplitMediaFromOutput()voice.tsmodule to centralize voice compatibility decisionsWhy
Voice notes feel more natural in chat contexts — they show waveforms, auto-play inline, and match user expectations for conversational audio. This gives agents a way to opt into that UX.
Testing
send.test.tsAI Disclosure 🤖
Built by Jarvis (Claude) with Manuel's guidance. Fully tested, code reviewed and understood.