Interface AudioEncoderConfiguration

AudioEncoderConfiguration is the interface that defines the audio encoder configurations.

You can customize the audio encoder configurations when calling AgoraRTC.createCustomAudioTrack, AgoraRTC.createMicrophoneAudioTrack or AgoraRTC.createBufferSourceAudioTrack.


  • AudioEncoderConfiguration



Optional bitrate

bitrate: undefined | number

Bitrate of the audio (Kbps).

Optional sampleRate

sampleRate: undefined | number

Sample rate of the audio (Hz).

Optional sampleSize

sampleSize: undefined | number

Sample size of the audio.

Optional stereo

stereo: undefined | false | true

Whether to enable stereo.