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 @@ from pipecat.frames.frames import ( 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 @@ class BaseInputTransport(FrameProcessor): 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)