# Achieve high audio quality (/en/realtime-media/interactive-live-streaming/build/optimize-quality-and-connection/best-practices-sound-quality)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<_PlatformTabsGroup groupMode="structured" canonicalPlatform="web" platforms="[&#x22;android&#x22;,&#x22;ios&#x22;,&#x22;macos&#x22;,&#x22;web&#x22;,&#x22;windows&#x22;,&#x22;electron&#x22;,&#x22;flutter&#x22;,&#x22;react-native&#x22;,&#x22;unity&#x22;]" showTabs="true">
  <_PlatformPanel platform="android">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="android" />

    Some use-cases, 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 [#general-settings]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties]

    Call [`setAudioProfile` \[2/2\]](https://api-ref.agora.io/en/voice-sdk/android/4.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile2) to set the profile to `MUSIC_HIGH_QUALITY_STEREO` (5). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    <CodeBlockTabs defaultValue="java">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="java">
          Java
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="kotlin">
          Kotlin
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="java">
        ```java
        // Set the audio profile to MUSIC_HIGH_QUALITY_STEREO
        RtcEngine.setAudioProfile(Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO);
        ```
      </CodeBlockTab>

      <CodeBlockTab value="kotlin">
        ```kotlin
        // Set the audio profile to MUSIC_HIGH_QUALITY_STEREO
        RtcEngine.setAudioProfile(Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO)
        ```
      </CodeBlockTab>
    </CodeBlockTabs>

    ### Set audio use-case [#set-audio-use-case]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/voice-sdk/android/4.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING` (3).

    <CodeBlockTabs defaultValue="java">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="java">
          Java
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="kotlin">
          Kotlin
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="java">
        ```java
        // Set the audio scenario to GAME_STREAMING
        config.mAudioScenario = Constants.AudioScenario.getValue(Constants.AudioScenario.GAME_STREAMING);
        engine = RtcEngine.create(config);
        ```
      </CodeBlockTab>

      <CodeBlockTab value="kotlin">
        ```kotlin
        // Set the audio scenario to GAME_STREAMING
        config.mAudioScenario = Constants.AudioScenario.getValue(Constants.AudioScenario.GAME_STREAMING)
        engine = RtcEngine.create(config)
        ```
      </CodeBlockTab>
    </CodeBlockTabs>

    ## Sound card settings [#sound-card-settings]

    This section only applies to users using sound cards.

    ### Disable 3A [#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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/voice-sdk/android/4.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    <CodeBlockTabs defaultValue="java">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="java">
          Java
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="kotlin">
          Kotlin
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="java">
        ```java
        // Turn off echo cancellation
        engine.setParameters("{\"che.audio.aec.enable\":false}");
        // Turn off noise reduction
        engine.setParameters("{\"che.audio.ans.enable\":false}");
        // Turn off gain control
        engine.setParameters("{\"che.audio.agc.enable\":false}");
        ```
      </CodeBlockTab>

      <CodeBlockTab value="kotlin">
        ```kotlin
        // Turn off echo cancellation
        engine.setParameters("{\"che.audio.aec.enable\":false}")
        // Turn off noise reduction
        engine.setParameters("{\"che.audio.ans.enable\":false}")
        // Turn off gain control
        engine.setParameters("{\"che.audio.agc.enable\":false}")
        ```
      </CodeBlockTab>
    </CodeBlockTabs>

    ### Turn on stereo capture [#turn-on-stereo-capture]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/voice-sdk/android/4.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING` (2), that is, use two channels to collect and send stereo sound.

    <CodeBlockTabs defaultValue="java">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="java">
          Java
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="kotlin">
          Kotlin
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="java">
        ```java
        // Set advanced audio options for 2 audio processing channels
        AdvancedAudioOptions options = new AdvancedAudioOptions();
        options.audioProcessingChannels = 2;
        m_lpAgoraEngine.setAdvancedAudioOptions(options);
        ```
      </CodeBlockTab>

      <CodeBlockTab value="kotlin">
        ```kotlin
        // Set advanced audio options for 2 audio processing channels
        val options = AdvancedAudioOptions()
        options.audioProcessingChannels = 2
        m_lpAgoraEngine.setAdvancedAudioOptions(options)
        ```
      </CodeBlockTab>
    </CodeBlockTabs>

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="ios">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="ios" />

    Some use-cases, 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 [#general-settings-1]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-1]

    Call [`setAudioProfile` \[2/2\]](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/setaudioprofile\(_:\)) to set the audio profile to `AgoraAudioProfileMusicHighQuality` (4). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```objc
    (int) setAudioProfile : (AgoraAudioProfile) profile;
    ```

    ### Set audio scenario [#set-audio-scenario]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/setaudioscenario\(_:\)) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING` (3).

    ```java
    (int) setAudioScenario : (AgoraAudioScenario) scenario;
    ```

    ## Sound card settings [#sound-card-settings-1]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-1]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/setparameters\(_:\)).

    ```objc
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-1]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agorartcenginekit/setadvancedaudiooptions\(_:\)) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING` (2), that is, use two channels to collect and send stereo sound.

    ```objc
    (int) setAdvancedAudioOptions : (AgoraAdvancedAudioOptions * _Nonnull) options;
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="macos">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="macos" />

    Some use-cases, 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 [#general-settings-2]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-2]

    Call [`setAudioProfile` \[2/2\]](https://api-ref.agora.io/en/video-sdk/macos/4.x/documentation/agorartckit/agorartcenginekit/setaudioprofile\(_:\)) to set the audio profile to `AgoraAudioProfileMusicHighQuality(4)`. It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```objc
    (int) setAudioProfile : (AgoraAudioProfile) profile;
    ```

    ### Set audio scenario [#set-audio-scenario-1]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/video-sdk/macos/4.x/documentation/agorartckit/agorartcenginekit/setaudioscenario\(_:\)) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING(3)`.

    ```java
    (int) setAudioScenario : (AgoraAudioScenario) scenario;
    ```

    ## Sound card settings [#sound-card-settings-2]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-2]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/macos/4.x/documentation/agorartckit/agorartcenginekit/setparameters\(_:\)).

    ```objc
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-2]

    Call [setAdvancedAudioOptions](https://api-ref.agora.io/en/video-sdk/macos/4.x/documentation/agorartckit/agorartcenginekit/setadvancedaudiooptions\(_:\)) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING(2)`, that is, use two channels to collect and send stereo sound.

    ```objc
    (int) setAdvancedAudioOptions : (AgoraAdvancedAudioOptions * _Nonnull) options;
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="web">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="web" />

    Some use-cases, 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 [#general-settings-3]

    To improve the audio quality experience, consider the following:

    ### Using default audio encoding [#using-default-audio-encoding]

    Call [`createMicrophoneAudioTrack`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/iagorartc.html#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.

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

    ### Custom audio encoding [#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.

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

    ## Sound card settings [#sound-card-settings-3]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-3]

    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`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/iagorartc.html#createmicrophoneaudiotrack).

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

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="windows">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="windows" />

    Some use-cases, 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 [#general-settings-4]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-3]

    Call [`setAudioProfile` \[2/2\]](https://api-ref.agora.io/en/video-sdk/cpp/4.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile2) to set the audio profile to `AudioProfileMusicHighQuality` (4) and scenario to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY` (4). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```cpp
    virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile) = 0;
    ```

    ### Set audio scenario [#set-audio-scenario-2]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/video-sdk/cpp/4.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING` (3).

    ```cpp
    virtual int setAudioScenario(AUDIO_SCENARIO_TYPE scenario) = 0;
    ```

    ## Sound card settings [#sound-card-settings-4]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-4]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/cpp/4.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    ```cpp
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-3]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/cpp/4.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AudioProcessingStereo` (2), that is, use two channels to collect and send stereo sound.

    <CalloutContainer type="info">
      <CalloutDescription>
        Call this method before calling `joinChannel`, `enableAudio`, and `enableLocalAudio`.
      </CalloutDescription>
    </CalloutContainer>

    ```cpp
    virtual int setAdvancedAudioOptions(media::base::AdvancedAudioOptions &options) = 0;
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="electron">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="electron" />

    Some use-cases, 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 [#general-settings-5]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-4]

    Call [`setAudioProfile`](https://api-ref.agora.io/en/voice-sdk/electron/4.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile) to set the profile to `AudioProfileMusicHighQuality` (4) and scenario to `AudioScenarioGameStreaming` (3). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```typescript
    abstract setAudioProfile(
      profile: AudioProfileType,
      scenario?: AudioScenarioType
     ): number;
    ```

    ### Set audio scenario [#set-audio-scenario-3]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/voice-sdk/electron/4.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING` (3).

    ```typescript
    abstract setAudioScenario(scenario: AudioScenarioType): number;
    ```

    ## Sound card settings [#sound-card-settings-5]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-5]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/electron/4.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    ```typescript
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-4]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/electron/4.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AudioProcessingStereo` (2), that is, use two channels to collect and send stereo sound.

    ```typescript
    abstract setAdvancedAudioOptions(options: AdvancedAudioOptions): number;
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="flutter">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="flutter" />

    Some use-cases, 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 [#general-settings-6]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-5]

    Call [`setAudioProfile`](https://api-ref.agora.io/en/voice-sdk/flutter/6.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile) to set the audio profile to `audioProfileMusicHighQuality` (4). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```dart
    Future<void> setAudioProfile(
      {required AudioProfileType profile,
      AudioScenarioType scenario = AudioScenarioType.audioScenarioDefault});
    ```

    ### Set audio scenario [#set-audio-scenario-4]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/voice-sdk/flutter/6.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `audioScenarioGameStreaming` (3).

    ```dart
    Future<void> setAudioScenario(AudioScenarioType scenario);
    ```

    ## Sound card settings [#sound-card-settings-6]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-6]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/flutter/6.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    ```dart
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-5]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/flutter/6.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING` (2), that is, use two channels to collect and send stereo sound.

    <CalloutContainer type="info">
      <CalloutDescription>
        Call this method before calling `joinChannel`, `enableAudio`, and `enableLocalAudio`.
      </CalloutDescription>
    </CalloutContainer>

    ```dart
    Future<void> setAdvancedAudioOptions(AdvancedAudioOptions options);
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="react-native">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="react-native" />

    Some use-cases, 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 [#general-settings-7]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-6]

    Call [`setAudioProfile`](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile) to set the audio profile to `AudioProfileMusicHighQuality` (4). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```typescript
    abstract setAudioProfile(
      profile: AudioProfileType,
      scenario?: AudioScenarioType
     ): number;
    ```

    ### Set audio scenario [#set-audio-scenario-5]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `AudioScenarioGameStreaming` (3).

    ```typescript
    abstract setAudioScenario(scenario: AudioScenarioType): number;
    ```

    ## Sound card settings [#sound-card-settings-7]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-7]

    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 the 3A function by calling [`setParameters`](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    ```typescript
    setParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    setParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    setParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-6]

    Call [`setAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/react-native/4.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING` (2), that is, use two channels to collect and send stereo sound.

    ```typescript
    abstract setAdvancedAudioOptions(options: AdvancedAudioOptions): number;
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>

  <_PlatformPanel platform="unity">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="unity" />

    Some use-cases, 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 game.

    ## General settings [#general-settings-8]

    To improve the audio quality experience, consider the following:

    ### Set audio encoding properties [#set-audio-encoding-properties-7]

    Call [`setAudioProfile` \[2/2\]](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_setaudioprofile2) to set the audio profile to `MUSIC_HIGH_QUALITY_STEREO` (5). It uses a 48 kHz sampling rate, music encoding, two channels, and the maximum encoding rate is 128 Kbps.

    ```csharp
    public abstract int SetAudioProfile(AUDIO_PROFILE_TYPE profile);
    ```

    ### Set audio scenario [#set-audio-scenario-6]

    Call [`setAudioScenario`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_setaudioscenario) to set the audio scenario to high-quality `AUDIO_SCENARIO_GAME_STREAMING` (3).

    ```csharp
    public abstract int SetAudioScenario(AUDIO_SCENARIO_TYPE scenario);
    ```

    ## Sound card settings [#sound-card-settings-8]

    This section only applies to users using sound cards.

    ### Disable 3A [#disable-3a-8]

    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 the 3A function by calling [`SetParameters`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_setparameters).

    ```cpp
    SetParameters("{\"che.audio.aec.enable\":false}") // Turn off echo cancellation
    SetParameters("{\"che.audio.ans.enable\":false}") // Turn off noise reduction
    SetParameters("{\"che.audio.agc.enable\":false}") // Turn off gain control
    ```

    ### Turn on stereo capture [#turn-on-stereo-capture-7]

    Call [`SetAdvancedAudioOptions`](https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_setadvancedaudiooptions) to set the number of audio pre-processing channels to `AGORA_AUDIO_STEREO_PROCESSING` (2), that is, use two channels to collect and send stereo sound.

    ```csharp
    public abstract int SetAdvancedAudioOptions(AdvancedAudioOptions options);
    ```

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>
</_PlatformTabsGroup>
