From b1bf6f773398a9eb88c272d2453ba8dc1369ea02 Mon Sep 17 00:00:00 2001 From: Chad Bailey Date: Wed, 2 Oct 2024 19:43:51 +0000 Subject: [PATCH] fixed botinterruptionframe --- src/pipecat/transports/base_input.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pipecat/transports/base_input.py b/src/pipecat/transports/base_input.py index 710f8108a..ad95d1139 100644 --- a/src/pipecat/transports/base_input.py +++ b/src/pipecat/transports/base_input.py @@ -5,17 +5,17 @@ # import asyncio - from concurrent.futures import ThreadPoolExecutor -from pipecat.processors.frame_processor import FrameDirection, FrameProcessor +from loguru import logger + from pipecat.frames.frames import ( BotInterruptionFrame, CancelFrame, - InputAudioRawFrame, - StartFrame, EndFrame, Frame, + InputAudioRawFrame, + StartFrame, StartInterruptionFrame, StopInterruptionFrame, SystemFrame, @@ -23,11 +23,10 @@ UserStoppedSpeakingFrame, VADParamsUpdateFrame, ) +from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.transports.base_transport import TransportParams from pipecat.vad.vad_analyzer import VADAnalyzer, VADState -from loguru import logger - class BaseInputTransport(FrameProcessor): def __init__(self, params: TransportParams, **kwargs): @@ -87,6 +86,7 @@ async def process_frame(self, frame: Frame, direction: FrameDirection): elif isinstance(frame, BotInterruptionFrame): logger.debug("Bot interruption") await self._start_interruption() + await self.push_frame(StartInterruptionFrame()) # All other system frames elif isinstance(frame, SystemFrame): await self.push_frame(frame, direction)