diff --git a/examples/foundational/05-sync-speech-and-image.py b/examples/foundational/05-sync-speech-and-image.py index 35f8f411c..b896261ae 100644 --- a/examples/foundational/05-sync-speech-and-image.py +++ b/examples/foundational/05-sync-speech-and-image.py @@ -31,6 +31,7 @@ from pipecat.runner.utils import create_transport from pipecat.services.cartesia.tts import CartesiaHttpTTSService from pipecat.services.fal.image import FalImageGenService from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.tts_service import TextAggregationMode from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -114,6 +115,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): settings=CartesiaHttpTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), + # No need to aggregate by sentences (the default), as we already know we're getting full sentences + # (Otherwise the service will unnecessarily wait for follow-up input to confirm the sentence is complete, + # which, sadly, actually breaks the synchronization mechanism) + text_aggregation_mode=TextAggregationMode.TOKEN, ) imagegen = FalImageGenService( diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index f3d9fbdea..a74ee4f81 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -633,7 +633,7 @@ class FrameProcessor(BaseObject): async def pause_processing_frames(self): """Pause processing of queued frames.""" - logger.trace(f"{self}: pausing frame processing") + logger.debug(f"{self}: pausing frame processing") self.__should_block_frames = True if self.__process_event: self.__process_event.clear() @@ -647,7 +647,7 @@ class FrameProcessor(BaseObject): async def resume_processing_frames(self): """Resume processing of queued frames.""" - logger.trace(f"{self}: resuming frame processing") + logger.debug(f"{self}: resuming frame processing") if self.__process_event: self.__process_event.set()