AudioVolumeInfo

User volume information.

class AudioVolumeInfo {
    const AudioVolumeInfo({this.uid, this.volume, this.vad, this.voicePitch});

    @JsonKey(name: 'uid')
    final int? uid;
    @JsonKey(name: 'volume')
    final int? volume;
    @JsonKey(name: 'vad')
    final int? vad;
    @JsonKey(name: 'voicePitch')
    final double? voicePitch;
    factory AudioVolumeInfo.fromJson(Map<String, dynamic> json) =>
        _$AudioVolumeInfoFromJson(json);
    Map<String, dynamic> toJson() => _$AudioVolumeInfoToJson(this);
  }

Properties

uid
User ID.
  • In the local user's callback, uid is 0.
  • In the remote user's callback, uid is the ID of the remote user with the highest instantaneous volume (up to 3 users).
volume
User volume, range [0,255]. If the user mutes themselves (sets muteLocalAudioStream to true) but audio capture is enabled, the volume value represents the volume of the locally captured signal.
vad
Note:
  • vad does not report the voice status of remote users. For remote users, the value of vad is always 1.
  • To use this parameter, set reportVad to true when calling enableAudioVolumeIndication.
Voice activity status of the local user.
  • 0: No voice detected locally.
  • 1: Voice detected locally.
voicePitch
Voice pitch of the local user (Hz). Value range: [0.0, 4000.0].
Note: voicePitch does not report the voice pitch of remote users. For remote users, the value of voicePitch is always 0.0.