Skip to content

Conversation

@aconchillo
Copy link
Contributor

Please describe the changes in your PR. If it is addressing an issue, please reference that as well.

Introducing new interruption and speaking strategies. Interruption strategies are used to indicate when the user should interrupt the bot (e.g. using VAD events or when a user says one or more words). Speaking strategies are used to indicate when the bot should start talking (e.g. using an end-of-turn detection model, or checking how long until the last user transcription). In conversational agents these are usually referred to start/stop speaking policies or plans.

Available interruption strategies:

  • VADInterruptionStrategy (default)
  • MinWordsInterruptionStrategy

Avaliable speaking strategies:

  • TranscriptionSpeakingStrategy (default)
  • TurnAnalyzerSpeakingStrategy

To set these strategies you do it when setting up the PipelineTask, for example:

task = PipelineTask(..., params=PipelineParams(
    interruption_strategies=[MinWordsInterruptionStrategy(min_words=1)],
    speaking_strategies=[
        TurnAnalyzerSpeakingStrategy(
            turn_analyzer=LocalSmartTurnAnalyzerV3(params=SmartTurnParams())
        )
    ],
))

In order to use the new interruption and speaking strategies you should update to the new universal LLMContext and LLMContextAggregatorPair.

continue

silent_for = time.time() - last_update_ts
if match_endofsentence(self._text) or silent_for >= SILENCE_TIMEOUT:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It occurred to me that checking for end of sentence also allowed us to use semantic to avoid false positives. This has actually worked really well. Before we were sending requests to the LLM all the time.

@aconchillo aconchillo marked this pull request as draft November 12, 2025 23:44
@aconchillo aconchillo force-pushed the aleix/redesign-interruption-strategies branch from 4e33406 to c0dfb95 Compare November 12, 2025 23:45
@aconchillo aconchillo force-pushed the aleix/redesign-interruption-strategies branch 4 times, most recently from 2955825 to 9add941 Compare November 14, 2025 16:48
@aconchillo aconchillo force-pushed the aleix/redesign-interruption-strategies branch from 9add941 to e99d79a Compare November 17, 2025 18:30
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.

2 participants