Skip to content

feat: support receiving voice messages via ASR transcription#22

Open
clairewangjia wants to merge 1 commit intoWechat-ggGitHub:mainfrom
clairewangjia:feat/voice-message-support
Open

feat: support receiving voice messages via ASR transcription#22
clairewangjia wants to merge 1 commit intoWechat-ggGitHub:mainfrom
clairewangjia:feat/voice-message-support

Conversation

@clairewangjia
Copy link
Copy Markdown

Summary

  • Extract voice text from incoming WeChat voice messages using the ASR transcription provided by the iLink API
  • Voice messages now appear as [语音] <transcribed text> and are processed by Claude like normal text input
  • Handle both voice_text and text field names in VoiceItem (the actual iLink API returns text, not voice_text)

Changes

  • src/wechat/media.ts: Add voice type handling in extractText() to return ASR transcription with [语音] prefix
  • src/wechat/types.ts: Add text and media fields to VoiceItem interface to match actual API response

Test plan

  • Send a voice message from WeChat → Claude receives the transcribed text and replies normally
  • Text and image messages continue to work as before
  • Build passes with no errors

🤖 Generated with Claude Code

Extract voice text from incoming WeChat voice messages using the ASR
transcription provided by the iLink API. Voice messages now appear as
"[语音] <transcribed text>" and are processed by Claude like normal text.

- Handle both `voice_text` and `text` field names in VoiceItem (API returns `text`)
- Add `media` field to VoiceItem type for CDN data compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant