Description
The WhatsApp platform adapter (gateway/platforms/whatsapp.py) does not override send_voice() from the base class. The base class fallback sends the audio file path as plain text (e.g. π Audio: /path/to/file.ogg) instead of delivering it as a native voice message.
All other media methods (send_image, send_image_file, send_video, send_document) are properly overridden and call _send_media_to_bridge(), but send_voice was missed.
Steps to Reproduce
- Use TTS (e.g. Edge provider) to generate a voice reply on WhatsApp
- The user receives a text message with the file path instead of a playable voice note
Expected Behavior
Voice messages should be delivered as native WhatsApp audio/voice notes, same as other platforms (Telegram works correctly).
Fix
Add the following override to WhatsAppAdapter in gateway/platforms/whatsapp.py:
async def send_voice(
self,
chat_id: str,
audio_path: str,
caption: Optional[str] = None,
reply_to: Optional[str] = None,
**kwargs,
) -> SendResult:
"""Send an audio file as a native WhatsApp voice message via bridge."""
return await self._send_media_to_bridge(chat_id, audio_path, "audio", caption)
This is a 3-line fix. Similar to #4339 (Matrix missing voice support).
Description
The WhatsApp platform adapter (
gateway/platforms/whatsapp.py) does not overridesend_voice()from the base class. The base class fallback sends the audio file path as plain text (e.g.π Audio: /path/to/file.ogg) instead of delivering it as a native voice message.All other media methods (
send_image,send_image_file,send_video,send_document) are properly overridden and call_send_media_to_bridge(), butsend_voicewas missed.Steps to Reproduce
Expected Behavior
Voice messages should be delivered as native WhatsApp audio/voice notes, same as other platforms (Telegram works correctly).
Fix
Add the following override to
WhatsAppAdapteringateway/platforms/whatsapp.py:This is a 3-line fix. Similar to #4339 (Matrix missing voice support).