processors(WakeCheckFilter): push error

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-22 15:43:52 -07:00
parent 0e5711e62d
commit e1169a4e82

View File

@@ -9,7 +9,7 @@ import time
from enum import Enum
from pipecat.frames.frames import Frame, TranscriptionFrame
from pipecat.frames.frames import ErrorFrame, Frame, TranscriptionFrame
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
from loguru import logger
@@ -79,4 +79,6 @@ class WakeCheckFilter(FrameProcessor):
else:
await self.push_frame(frame, direction)
except Exception as e:
logger.error(f"Error in wake word filter: {e}")
error_msg = f"Error in wake word filter: {e}"
logger.error(error_msg)
await self.push_error(ErrorFrame(error_msg))