processors: remove block_on_frames and add pause_processing_frames() instead

This commit is contained in:
Aleix Conchillo Flaqué
2024-11-06 14:20:25 -08:00
parent 7071482583
commit 865768039b
5 changed files with 39 additions and 23 deletions

View File

@@ -15,7 +15,6 @@ from loguru import logger
from pipecat.audio.utils import calculate_audio_volume, exp_smoothing
from pipecat.frames.frames import (
AudioRawFrame,
BotStoppedSpeakingFrame,
CancelFrame,
EndFrame,
ErrorFrame,
@@ -294,8 +293,6 @@ class TTSService(AIService):
await self._process_text_frame(frame)
elif isinstance(frame, StartInterruptionFrame):
await self._handle_interruption(frame, direction)
elif isinstance(frame, BotStoppedSpeakingFrame):
await self.resume_processing_frames()
elif isinstance(frame, (LLMFullResponseEndFrame, EndFrame)):
sentence = self._current_sentence
self._current_sentence = ""