BaseTextAggregator (text/base_text_aggregator.py)

StevenVincentOne/pipecat · src/pipecat/utils/text/base_text_aggregator.py · python · BSD-2-Clause
voice

Copyright (c) 2024–2025, Daily SPDX-License-Identifier: BSD 2-Clause License

# Source: https://github.com/StevenVincentOne/pipecat | License: BSD-2-Clause | Copyright 2024–2025, Daily
# Provided via justclaw.it.com; keep this notice with the code.
#
# Copyright (c) 2024–2025, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#

"""Base text aggregator interface for Pipecat text processing.

This module defines the abstract base class for text aggregators that accumulate
and process text tokens, typically used by TTS services to determine when
aggregated text should be sent for speech synthesis.
"""

from abc import ABC, abstractmethod
from typing import Optional


class BaseTextAggregator(ABC):
    """Base class for text aggregators in the Pipecat framework.

    Text aggregators are usually used by the TTS service to aggregate LLM tokens
    and decide when 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key