Only set/clear voicemail_event when voicemail is detected
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user