fix old interruption/speaking strategies docstrings

This commit is contained in:
Aleix Conchillo Flaqué
2025-12-22 16:19:25 -08:00
parent ae9ee33af9
commit b5fe1c9cd8
5 changed files with 8 additions and 7 deletions

View File

@@ -42,7 +42,8 @@ class MinWordsInterruptionStrategy(BaseInterruptionStrategy):
warnings.simplefilter("always") warnings.simplefilter("always")
warnings.warn( warnings.warn(
"'pipecat.audio.interruptions' is deprecated. " "'pipecat.audio.interruptions' is deprecated. "
"Use the new interruption and speaking strategies.", "Use `pipecat.turns.user.MinWordsUserTurnStartStrategy` with `PipelineTask`'s "
"new `turn_start_strategies` parameter instead.",
DeprecationWarning, DeprecationWarning,
) )

View File

@@ -266,7 +266,7 @@ class LLMUserAggregator(LLMContextAggregator):
await self._cleanup() await self._cleanup()
async def reset(self): async def reset(self):
"""Reset the aggregation state and interruption strategies.""" """Reset the aggregation state and turn start strategies."""
await super().reset() await super().reset()
if self.turn_start_strategies and self.turn_start_strategies.user: if self.turn_start_strategies and self.turn_start_strategies.user:

View File

@@ -115,8 +115,8 @@ class TransportParams(BaseModel):
turn_analyzer: Turn-taking analyzer instance for conversation management. turn_analyzer: Turn-taking analyzer instance for conversation management.
.. deprecated:: 0.0.99 .. deprecated:: 0.0.99
The `turn_analyzer` parameter is deprecated, use speaking strategies instead. The `turn_analyzer` parameter is deprecated, use `PipelineTask`'s
new `turn_start_strategies` parameter instead.
""" """
model_config = ConfigDict(arbitrary_types_allowed=True) model_config = ConfigDict(arbitrary_types_allowed=True)

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD 2-Clause License # SPDX-License-Identifier: BSD 2-Clause License
# #
"""Transcription time-based speaking strategy.""" """Transcription time-based bot turn start strategy."""
import asyncio import asyncio
from typing import Optional from typing import Optional

View File

@@ -21,12 +21,12 @@ class TranscriptionUserTurnStartStrategy(BaseUserTurnStartStrategy):
""" """
def __init__(self): def __init__(self):
"""Initialize the base interruption strategy.""" """Initialize transcription-based user turn start strategy."""
super().__init__() super().__init__()
self._bot_speaking = False self._bot_speaking = False
async def reset(self): async def reset(self):
"""Reset the interruption strategy.""" """Reset the strategy to its initial state."""
await super().reset() await super().reset()
self._bot_speaking = False self._bot_speaking = False