fix: send WhatsApp TTS as native audio - #9899
Closed
noestelar wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes WhatsApp TTS/voice delivery by adding a WhatsApp-specific send_voice() implementation that uploads audio through the WhatsApp bridge as native media (instead of falling back to the base adapter behavior of sending the local file path as text).
Changes:
- Added
WhatsAppAdapter.send_voice()to route audio through_send_media_to_bridge(..., "audio", ...). - Added regression tests asserting that WhatsApp voice sends hit the bridge
/send-mediaendpoint withmediaType="audio"and carry captions through the adapter payload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
gateway/platforms/whatsapp.py |
Adds a WhatsApp-specific send_voice() that uses the bridge native media upload path. |
tests/gateway/test_whatsapp_voice.py |
New regression tests verifying bridge payload and endpoint usage for native audio sends. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Collaborator
|
Likely duplicate of #13002 — same WhatsApp send_voice() fix already merged. |
Collaborator
|
Likely duplicate of #13002 |
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
send_voice()implementation_send_media_to_bridge(..., "audio", ...)Test Plan
source venv/bin/activate && python -m pytest tests/gateway/test_whatsapp_voice.py -qNotes