Skip to content

Commit

Permalink
Merge pull request #540 from pipecat-ai/cb/interruption-fix
Browse files Browse the repository at this point in the history
Fixed RTVI `tts:interrupt` action not interrupting
  • Loading branch information
aconchillo authored Oct 2, 2024
2 parents 1d7d0bb + b1bf6f7 commit 65eeb0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pipecat/transports/base_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
#

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,
UserStartedSpeakingFrame,
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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 65eeb0f

Please sign in to comment.