Skip to main content
Android
iOS
macOS
Web
Windows
Electron
Flutter
React Native
Python
React JS
Unity
Unreal Engine
Unreal (Blueprint)

Achieve high audio quality

Some scenarios, such as karaoke sessions, podcasts, and performance-based chats, require a high-quality audio experience. This page shows you how to achieve clear high-definition audio, without noise or interference in your app.

General settings

To improve the audio quality experience, consider the following:

Using default audio encoding

Call createMicrophoneAudioTrack and in encoderConfig pass "high_quality_stereo", Video SDK's built-in audio encoding configuration. It uses a 48 ​​kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

AgoraRTC.createMicrophoneAudioTrack({
encoderConfig: "high_quality_stereo"
}).then(/**...**/);
Copy

Custom audio encoding

Use the following code example to customize audio encoding properties. This example sets a 48 kHz sampling rate, music encoding, two-channel usage, and a maximum encoding rate of 128 Kbps.

AgoraRTC.createMicrophoneAudioTrack({
encoderConfig: {
sampleRate: 48000,
stereo: true,
bitrate: 128,
},
}).then(/**...**/);
Copy

Sound card settings

This section only applies to users using sound cards.

Disable 3A

Video SDK turns on 3A by default. In audio processing, 3A stands for Acoustic Echo Cancellation (AEC), Active Noise Suppression (ANS), and Automatic Gain Control (AGC). Sound card devices usually provide some built-in audio processing, such as echo and noise cancellation. Currently, if 3A is enabled in the application layer, it may cause over-processing of the audio signal and interference between different algorithms may impact sound quality. Best practice is that users with sound cards disable 3A by calling createMicrophoneAudioTrack.

AgoraRTC.createMicrophoneAudioTrack({
AEC: false, // Turn off echo cancellation
AGC: false, // Turn off gain control
ANS: false, // Turn off noise reduction
}).then(/**...**/);
Copy

Voice Calling