Discussions

Ask a Question
Back to All

Controlling Mic and Capturing Avatar Speech in Real Time

I would appreciate your support regarding two points:

  1. Managing the user’s microphone:
    To avoid any interruptions while the avatar is speaking, we’d like to temporarily mute the user’s microphone during the avatar’s speech and re-enable it once the avatar finishes. What would be the recommended way to implement this behavior?

  2. Capturing spoken content:
    I came across discussions in your community forum ( https://docs.heygen.com/discuss/6831dae1d1bdae007092bf19 , https://docs.heygen.com/discuss/682ed16fea72c90053c11ff1 ) suggesting that it’s possible to capture spoken content in real-time using the StreamingEvents.AVATAR_TALKING_MESSAGE event. I’ve set up a listener for this event and monitored the console output, but I haven’t received any messages that include the actual spoken text.

Is there any specific configuration or condition required to access this data? Or should a different event be used to retrieve the avatar's spoken content?

Thank you in advance for your assistance.