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,
uidis 0. - In the remote user's callback,
uidis the ID of the remote user with the highest instantaneous volume (up to 3 users).
- In the local user's callback,
- volume
- User volume, range [0,255]. If the user mutes themselves (sets muteLocalAudioStream to true) but audio capture is enabled, the
volumevalue represents the volume of the locally captured signal. - vad
-
Note:Voice activity status of the local user.
vaddoes not report the voice status of remote users. For remote users, the value ofvadis always 1.- To use this parameter, set
reportVadto true when calling enableAudioVolumeIndication.
- 0: No voice detected locally.
- 1: Voice detected locally.
- voicePitch
- Voice pitch of the local user (Hz). Value range: [0.0, 4000.0].
Note:
voicePitchdoes not report the voice pitch of remote users. For remote users, the value ofvoicePitchis always 0.0.