From 31577252f3d037f06ea21c8b74ec080467e11298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 15 Aug 2024 15:23:31 -0700 Subject: [PATCH] processors(rtvi): handle ErrorFrames --- src/pipecat/processors/frameworks/rtvi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipecat/processors/frameworks/rtvi.py b/src/pipecat/processors/frameworks/rtvi.py index 267a992cd..f482aac6a 100644 --- a/src/pipecat/processors/frameworks/rtvi.py +++ b/src/pipecat/processors/frameworks/rtvi.py @@ -15,6 +15,7 @@ from pipecat.frames.frames import ( BotStoppedSpeakingFrame, CancelFrame, EndFrame, + ErrorFrame, Frame, InterimTranscriptionFrame, StartFrame, @@ -333,6 +334,9 @@ class RTVIProcessor(FrameProcessor): if isinstance(frame, CancelFrame): await self._cancel(frame) await self.push_frame(frame, direction) + elif isinstance(frame, ErrorFrame): + await self.send_error(frame.error) + await self.push_frame(frame, direction) # All other system frames elif isinstance(frame, SystemFrame): await self.push_frame(frame, direction)