Ansith Mohd
Ansith Mohd

Reputation: 21

speaking in Agora.io voice chat feature?

Is it possible to know which speaker is speaking in Agora.io voice chat feature?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

Upvotes: 2

Views: 1258

Answers (1)

Hermes
Hermes

Reputation: 2898

To detect the active speaker or if a user is broadcasting audio use the EnableAudioVolumeIndication and Audio Volume Indication Callback methods.

First you need to enable the VolumeIndication

public int EnableAudioVolumeIndication (int interval, int smooth);

And then you need to implement the handler to be get the volume details.

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

Full Documentation:

Upvotes: 1

Related Questions