Skip to content

Conversation

@chenghao-mou
Copy link
Member

This should close #4413

What happened:

  • VAD received audio frames, changing user stage to speaking;
  • Uninterruptible speech created, discarding audio frames for both STT and VAD. User state is stuck in speaking.

This PR should allow VAD to operate separately. Tested with

    @function_tool
    async def get_weather(self, location: str) -> str:
        """
        Called when the user asks about the weather.

        Args:
            location: The location to get the weather for
        """
        await asyncio.sleep(5) # <- interrupt here!
        self.session.say("And tomorrow is going to be sunny too.", allow_interruptions=False)
        return f"The weather in {location} is sunny today."

@chenghao-mou chenghao-mou requested a review from a team December 30, 2025 21:10
Copy link
Contributor

@longcw longcw left a comment

Choose a reason for hiding this comment

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

lgtm! do you think if we should ignore the user silence event if the speech is uninterruptible?

@chenghao-mou
Copy link
Member Author

lgtm! do you think if we should ignore the user silence event if the speech is uninterruptible?

Do you mean skip waiting for user silence when the uninterruptible agent speech hasn't started? I think we should keep it because to the user, the agent is not yet speaking and they are not done talking, especially now with VAD being enabled at all time.

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.

Agent stops responding if interrupted during a tool call with self.session.say

3 participants