Only set/clear voicemail_event when voicemail is detected

This commit is contained in:
Mark Backman
2025-08-21 19:40:57 -04:00
parent bd401e8d6f
commit 87ebbab758

View File

@@ -280,11 +280,13 @@ class ClassificationProcessor(FrameProcessor):
elif isinstance(frame, UserStartedSpeakingFrame): elif isinstance(frame, UserStartedSpeakingFrame):
# User started speaking - set the voicemail event # User started speaking - set the voicemail event
self._voicemail_event.set() if self._voicemail_detected:
self._voicemail_event.set()
elif isinstance(frame, UserStoppedSpeakingFrame): elif isinstance(frame, UserStoppedSpeakingFrame):
# User stopped speaking - clear the voicemail event # User stopped speaking - clear the voicemail event
self._voicemail_event.clear() if self._voicemail_detected:
self._voicemail_event.clear()
else: else:
# Pass all non-LLM frames through # Pass all non-LLM frames through