Discussions

Ask a Question
Back to All

Controlling the StreamingEvents

Hi,

I'm working with the Heygen Streaming Avatar SDK and I need help with controlling the StreamingEvents related to user interactions. I have two specific requirements:

  1. Avatar and User Speech Control:

    • I want to prevent the USER_START_TALKING event from being triggered while the avatar is speaking, even if the user attempts to speak
    • Essentially, I need to ensure that the avatar and user cannot speak simultaneously
  2. Manual Control of User Speech Events:

    • Instead of automatic voice detection, I want to manually control when USER_START_TALKING and USER_STOP_TALKING events are triggered
    • Specifically, I want these events to be triggered only when a user clicks custom start/stop buttons in my interface
    • This would give me more precise control over the conversation flow

Is there a way to achieve these controls through the SDK? Perhaps through configuration options or by overriding the default behavior?

Thank you for your help!