mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat(whatsapp): implement send_voice for audio message delivery
WhatsApp already receives incoming voice messages (audio/ogg via the bridge) but lacked a send_voice implementation, so TTS and audio responses fell back to the base class send_image path instead of being delivered as native audio messages. Route send_voice through the existing _send_media_to_bridge helper with media_type='audio', matching the pattern used by send_video and send_document.
This commit is contained in:
parent
23b81ab243
commit
ed76185c15
1 changed files with 11 additions and 0 deletions
|
|
@ -773,6 +773,17 @@ class WhatsAppAdapter(BasePlatformAdapter):
|
|||
"""Send a video natively via bridge — plays inline in WhatsApp."""
|
||||
return await self._send_media_to_bridge(chat_id, video_path, "video", caption)
|
||||
|
||||
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 WhatsApp voice message via bridge."""
|
||||
return await self._send_media_to_bridge(chat_id, audio_path, "audio", caption)
|
||||
|
||||
async def send_document(
|
||||
self,
|
||||
chat_id: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue