From 87ebbab7583ee39e9afa9e2a194b4a18740e7da5 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 21 Aug 2025 19:40:57 -0400 Subject: [PATCH] Only set/clear voicemail_event when voicemail is detected --- src/pipecat/extensions/voicemail/voicemail_detector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipecat/extensions/voicemail/voicemail_detector.py b/src/pipecat/extensions/voicemail/voicemail_detector.py index 47a2e5c46..52b7feeab 100644 --- a/src/pipecat/extensions/voicemail/voicemail_detector.py +++ b/src/pipecat/extensions/voicemail/voicemail_detector.py @@ -280,11 +280,13 @@ class ClassificationProcessor(FrameProcessor): elif isinstance(frame, UserStartedSpeakingFrame): # User started speaking - set the voicemail event - self._voicemail_event.set() + if self._voicemail_detected: + self._voicemail_event.set() elif isinstance(frame, UserStoppedSpeakingFrame): # User stopped speaking - clear the voicemail event - self._voicemail_event.clear() + if self._voicemail_detected: + self._voicemail_event.clear() else: # Pass all non-LLM frames through