Interface AudioEncoderConfiguration

AudioEncoderConfiguration is the interface that defines the audio encoder configurations.

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

interface AudioEncoderConfiguration {
    bitrate?: number;
    sampleRate?: number;
    sampleSize?: number;
    stereo?: boolean;
}

Properties

bitrate?: number

Bitrate of the audio (Kbps).

sampleRate?: number

Sample rate of the audio (Hz).

sampleSize?: number

Sample size of the audio.

stereo?: boolean

Whether to enable stereo.