From 97d37f3381828fa430b4046aad1eae9353bd385f Mon Sep 17 00:00:00 2001 From: tcpsyn Date: Thu, 5 Feb 2026 16:53:41 -0700 Subject: [PATCH] Send AI TTS audio to live caller during auto-respond The auto-respond function played AI TTS to the local Loopback channel but didn't send it over WebSocket to the live caller in the browser. Co-Authored-By: Claude Opus 4.6 --- backend/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/main.py b/backend/main.py index 32435ed..129251b 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1022,6 +1022,13 @@ async def _check_ai_auto_respond(real_caller_text: str, real_caller_name: str): ) thread.start() + # Also send to active real caller so they hear the AI + if session.active_real_caller: + caller_id = session.active_real_caller["caller_id"] + asyncio.create_task( + caller_service.send_audio_to_caller(caller_id, audio_bytes, 24000) + ) + # --- Follow-Up & Session Control Endpoints ---