AudioParams class

Audio data format.

The SDK calculates the sampling interval based on the samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks accordingly. Sampling interval = samplesPerCall / (sampleRate × channel). Make sure the sampling interval is not less than 0.01 (s).

Annotations
  • @JsonSerializable.new(explicitToJson: true, includeIfNull: false)

Properties

channels → int?
Number of audio channels. The possible values are: 1: Mono (default) 2: Stereo
final
hashCode → int
The hash code for this object.
no setterinherited
mode → RawAudioFrameOpModeType?
Usage mode of the data. See RawAudioFrameOpModeType.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate → int?
Sampling rate of the data in Hz. The possible values are: 8000 16000 (default) 32000 44100 48000
final
samplesPerCall → int?
Number of audio samples per call, typically 1024 in scenarios like media stream relay.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited