diff --git a/src/pipecat/processors/frameworks/rtvi.py b/src/pipecat/processors/frameworks/rtvi.py index 7bd84fb42..28e87ef2c 100644 --- a/src/pipecat/processors/frameworks/rtvi.py +++ b/src/pipecat/processors/frameworks/rtvi.py @@ -935,8 +935,8 @@ class RTVIObserverParams: system_logs_enabled: Indicates if system logs should be sent. errors_enabled: [Deprecated] Indicates if errors messages should be sent. skip_aggregator_types: List of aggregation types to skip sending as tts/output messages. - Note: if using this to avoid sending secure information, be sure to also disable - bot_llm_enabled to avoid leaking through LLM messages. + Note: if using this to avoid sending secure information, be sure to also disable + bot_llm_enabled to avoid leaking through LLM messages. bot_output_transforms: A list of callables to transform text before just before sending it to TTS. Each callable takes the aggregated text and its type, and returns the transformed text. To register, provide a list of tuples of diff --git a/src/pipecat/services/elevenlabs/tts.py b/src/pipecat/services/elevenlabs/tts.py index 38f4530a0..f7a3f4367 100644 --- a/src/pipecat/services/elevenlabs/tts.py +++ b/src/pipecat/services/elevenlabs/tts.py @@ -160,7 +160,7 @@ def build_elevenlabs_voice_settings( class PronunciationDictionaryLocator(BaseModel): """Locator for a pronunciation dictionary. - Attributes: + Parameters: pronunciation_dictionary_id: The ID of the pronunciation dictionary. version_id: The version ID of the pronunciation dictionary. """ diff --git a/src/pipecat/utils/string.py b/src/pipecat/utils/string.py index 5645d2bcf..b438dd4be 100644 --- a/src/pipecat/utils/string.py +++ b/src/pipecat/utils/string.py @@ -203,7 +203,7 @@ def parse_start_end_tags( class TextPartForConcatenation: """Class representing a part of text for concatenation with concatenate_aggregated_text. - Attributes: + Parameters: text: The text content. includes_inter_part_spaces: Whether any necessary inter-frame (leading/trailing) spaces are already included in the text. diff --git a/src/pipecat/utils/text/pattern_pair_aggregator.py b/src/pipecat/utils/text/pattern_pair_aggregator.py index 518ec13ae..72cda358b 100644 --- a/src/pipecat/utils/text/pattern_pair_aggregator.py +++ b/src/pipecat/utils/text/pattern_pair_aggregator.py @@ -26,15 +26,15 @@ class MatchAction(Enum): Parameters: REMOVE: The text along with its delimiters will be removed from the streaming text. - Sentence aggregation will continue on as if this text did not exist. + Sentence aggregation will continue on as if this text did not exist. KEEP: The delimiters will be removed, but the content between them will be kept. - Sentence aggregation will continue on with the internal text included. + Sentence aggregation will continue on with the internal text included. AGGREGATE: The delimiters will be removed and the content between will be treated - as a separate aggregation. Any text before the start of the pattern will be - returned early, whether or not a complete sentence was found. Then the pattern - will be returned. Then the aggregation will continue on sentence matching after - the closing delimiter is found. The content between the delimiters is not - aggregated by sentence. It is aggregated as one single block of text. + as a separate aggregation. Any text before the start of the pattern will be + returned early, whether or not a complete sentence was found. Then the pattern + will be returned. Then the aggregation will continue on sentence matching after + the closing delimiter is found. The content between the delimiters is not + aggregated by sentence. It is aggregated as one single block of text. """ REMOVE = "remove" @@ -133,17 +133,15 @@ class PatternPairAggregator(SimpleTextAggregator): Args: type: Identifier for this pattern pair. Should be unique and ideally descriptive. - (e.g., 'code', 'speaker', 'custom'). type can not be 'sentence' or 'word' as - those are reserved for the default behavior. + (e.g., 'code', 'speaker', 'custom'). type can not be 'sentence' or 'word' as + those are reserved for the default behavior. start_pattern: Pattern that marks the beginning of content. end_pattern: Pattern that marks the end of content. - action: What to do when a complete pattern is matched: - - MatchAction.REMOVE: Remove the matched pattern from the text. - - MatchAction.KEEP: Keep the matched pattern in the text and treat it as - normal text. This allows you to register handlers for - the pattern without affecting the aggregation logic. - - MatchAction.AGGREGATE: Return the matched pattern as a separate - aggregation object. + action: What to do when a complete pattern is matched. + + - MatchAction.REMOVE: Remove the matched pattern from the text. + - MatchAction.KEEP: Keep the matched pattern in the text and treat it as normal text. This allows you to register handlers for the pattern without affecting the aggregation logic. + - MatchAction.AGGREGATE: Return the matched pattern as a separate aggregation object. Returns: Self for method chaining.