1

I have recently started using Agora.io's voice chat feature in my Unity multiplayer game. I want to start animation local player object as soon as a specific person in a channel starts speaking and stop animation when he/she stops.

Is there any method in Agora SDK that can be invoked to know which user in the channel is speaking?

meghakshb
  • 11
  • 4

1 Answers1

8

I would imagine the person who is the loudest would be the person you would animate.

I would use enable volume indication with

public int EnableAudioVolumeIndication (int interval, int smooth);

and then see who is loudest with

public delegate void VolumeIndicationHandler (AudioVolumeInfo[] speakers, int speakerNumber, int totalVolume);

VolumeIndicationHandler Documentation Here

EnableAudioVolumeIndication Documentation Here

Jake
  • 125
  • 2
  • 10