AudioVolumeInfo

Used to retrieve user volume information.

struct AudioVolumeInfo {
  uid_t uid;
  unsigned int volume;
  unsigned int vad;
  double voicePitch;
};

Properties

uid
User ID.
  • In the callback for the local user, uid is 0.
  • In the callback for remote users, uid is the ID of the remote user with the highest instantaneous volume.
volume
User's volume, ranging from 0 (lowest) to 255 (highest).
  • If the local user has enabled audio capture and called muteLocalAudioStream to mute, this value represents the volume of the captured audio signal.
  • If the user has called startAudioMixing, this value represents the mixed audio volume.
vad
Note:
  • The vad parameter does not report the voice activity status of remote users. In callbacks for remote users, this value is always 1.
  • To use this parameter, you must set reportVad to true when calling enableAudioVolumeIndication.
Voice activity status of the local user.
  • 0: The local user is not speaking.
  • 1: The local user is speaking.
voicePitch
Voice pitch of the local user, ranging from 0.0 to 4000.0.
Note: The voicePitch parameter does not report the voice pitch of remote users. In callbacks for remote users, this value is always 0.0.