From 45d999ae705e4d50361a5304664827e620738cd3 Mon Sep 17 00:00:00 2001 From: Vicky Tam Date: Tue, 12 May 2026 10:47:38 +0800 Subject: [PATCH] fix: clear media_paths after successful voice transcription\ \ After transcribing a WhatsApp voice message, the .ogg file path \ remains in media_paths and gets appended as a [file: ...] tag. \ The LLM sees this tag and responds that it cannot process audio, \ even though the transcription already succeeded. --- nanobot/channels/whatsapp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nanobot/channels/whatsapp.py b/nanobot/channels/whatsapp.py index bd0620334..39134689d 100644 --- a/nanobot/channels/whatsapp.py +++ b/nanobot/channels/whatsapp.py @@ -265,6 +265,7 @@ class WhatsAppChannel(BaseChannel): transcription = await self.transcribe_audio(media_paths[0]) if transcription: content = transcription + media_paths = [] self.logger.info("Transcribed voice from {}: {}...", sender_id, transcription[:50]) else: content = "[Voice Message: Transcription failed]"