From 3d8bec484f18fd563c19c5f386e1c908be67b343 Mon Sep 17 00:00:00 2001 From: James Hush Date: Wed, 3 Dec 2025 14:40:36 +0100 Subject: [PATCH] feat(cartesia): make pause_frame_processing configurable in CartesiaTTSService Add pause_frame_processing parameter to CartesiaTTSService constructor to allow users to disable frame processing pausing during TTS generation. This is useful for use cases where text aggregation is disabled and users want to send text directly to the TTS service without pausing incoming frame processing. --- src/pipecat/services/cartesia/tts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/cartesia/tts.py b/src/pipecat/services/cartesia/tts.py index 9a47d9237..593defd1b 100644 --- a/src/pipecat/services/cartesia/tts.py +++ b/src/pipecat/services/cartesia/tts.py @@ -234,6 +234,7 @@ class CartesiaTTSService(AudioContextWordTTSService): params: Optional[InputParams] = None, text_aggregator: Optional[BaseTextAggregator] = None, aggregate_sentences: Optional[bool] = True, + pause_frame_processing: Optional[bool] = True, **kwargs, ): """Initialize the Cartesia TTS service. @@ -254,6 +255,7 @@ class CartesiaTTSService(AudioContextWordTTSService): Use an LLMTextProcessor before the TTSService for custom text aggregation. aggregate_sentences: Whether to aggregate sentences within the TTSService. + pause_frame_processing: Whether to pause processing frames while receiving audio. **kwargs: Additional arguments passed to the parent service. """ # Aggregating sentences still gives cleaner-sounding results and fewer @@ -269,7 +271,7 @@ class CartesiaTTSService(AudioContextWordTTSService): super().__init__( aggregate_sentences=aggregate_sentences, push_text_frames=False, - pause_frame_processing=True, + pause_frame_processing=pause_frame_processing, sample_rate=sample_rate, text_aggregator=text_aggregator, **kwargs,