Skip to content

Conversation

@jamsea
Copy link
Contributor

@jamsea jamsea commented Dec 3, 2025

Summary

Add pause_frame_processing parameter to CartesiaTTSService constructor to allow users to disable frame processing pausing during TTS generation.

Motivation

This is useful for use cases where:

  • Text aggregation is disabled (aggregate_sentences=False)
  • Users want to send text directly to the TTS service without pausing incoming frame processing
  • More control over frame flow is needed for custom pipelines

Changes

  • Added pause_frame_processing parameter to CartesiaTTSService.__init__() with default value True (preserving existing behavior)
  • Updated docstring to document the new parameter
  • Passes the parameter through to the parent AudioContextWordTTSService class

Usage

tts = CartesiaTTSService(
    api_key=os.getenv("CARTESIA_API_KEY"),
    voice_id="your_voice_id",
    aggregate_sentences=False,
    pause_frame_processing=False,  # New parameter
)

…TSService

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.
@jamsea jamsea requested a review from aconchillo December 3, 2025 13:42
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/pipecat/services/cartesia/tts.py 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

aggregate_sentences=aggregate_sentences,
push_text_frames=False,
pause_frame_processing=True,
pause_frame_processing=pause_frame_processing,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to add a constructor argument, we simply want to set this to False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants