feat: support sending voice messages (SILK/MP3/OGG)#62
Open
lemoncat7 wants to merge 2 commits intoTencent:mainfrom
Open
feat: support sending voice messages (SILK/MP3/OGG)#62lemoncat7 wants to merge 2 commits intoTencent:mainfrom
lemoncat7 wants to merge 2 commits intoTencent:mainfrom
Conversation
added 2 commits
April 14, 2026 11:43
- sendVoiceMessageWeixin(): sends voice via CDN + MessageItemType.VOICE - uploadVoiceToWeixin(): uploads audio with media_type=4 (VOICE) - sendWeixinMediaFile() routes audio/* to voice upload path - Supported encode types: 6=SILK, 7=MP3, 8=OGG-SPEEX - Closes #feature/voice-send
- sendVoiceMessageWeixin(): sends voice via CDN + MessageItemType.VOICE - uploadVoiceToWeixin(): uploads audio with media_type=4 (VOICE) - sendWeixinMediaFile() routes audio/* to voice upload path - Supported encode types: 6=SILK, 7=MP3, 8=OGG-SPEEX
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.
Summary
Adds support for sending voice messages to WeChat, completing the round-trip for voice media.
What was added
sendVoiceMessageWeixin()insrc/messaging/send.tsMessageItemType.VOICEplaytimeMsandencodeTypeparamsuploadVoiceToWeixin()insrc/cdn/upload.tsmedia_type=4(VOICE) to WeChat CDNuploadMediaToCdn()pipeline (AES-128-ECB encryption)sendWeixinMediaFile()now routesaudio/*MIME types to the voice pathaudio/mp3→ encode_type=7audio/ogg→ encode_type=8API surface
Note
Receiving voice was already implemented (
silk-transcode.ts+VoiceItem). This PR adds the send direction, making voice a full two-way media type.Closes #feature/voice-send