io.agora.rtc.audio3a

## Class AecConfig

- java.lang.Object
- - io.agora.rtc.audio3a.AecConfig

-     public class AecConfig
      extends java.lang.Object

  Acoustic Echo Cancellation (AEC) configuration. Used to configure AEC parameters for audio processing.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Constants.AecModelType` | `aecModelType` The Aec Model Type.
    `private int` | `aecStartupMaxSuppressTimeInMs` When Aec is in startup state, an extreme Aec suppression is needed.
    `private Constants.AecSuppressionMode` | `aecSuppressionMode` The Aec suppression level.
    `private Constants.AIAecSuppressionMode` | `aiAecSuppressionMode` The AIAec suppression mode.
    `private boolean` | `enableAecAutoReset` Whether to enable Aec auto-reset when Aec is unavailable.
    `private boolean` | `enabled` Whether to enable Aec.
    `private Constants.AecFilterLength` | `filterLength` The Aec linear filter length.
    `private boolean` | `stereoAecEnabled` Whether to enable stereo Aec.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AecConfig()` Constructs an AecConfig with default settings.
    `AecConfig(boolean enabled, boolean stereoAecEnabled, boolean enableAecAutoReset, int aecStartupMaxSuppressTimeInMs, Constants.AecFilterLength filterLength, Constants.AecModelType aecModelType, Constants.AecSuppressionMode aecSuppressionMode, Constants.AIAecSuppressionMode aiAecSuppressionMode)` All-args constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Constants.AecModelType` | `getAecModelType()` Gets the AEC model type.
    `int` | `getAecStartupMaxSuppressTimeInMs()` Gets the AEC startup maximum suppression time.
    `Constants.AecSuppressionMode` | `getAecSuppressionMode()` Gets the AEC suppression mode.
    `Constants.AIAecSuppressionMode` | `getAiAecSuppressionMode()` Gets the AI AEC suppression mode.
    `Constants.AecFilterLength` | `getFilterLength()` Gets the AEC filter length.
    `boolean` | `isEnableAecAutoReset()` Returns whether the AEC auto-reset is enabled.
    `boolean` | `isEnabled()` Returns whether AEC is enabled.
    `boolean` | `isStereoAecEnabled()` Returns whether stereo AEC is enabled.
    `void` | `setAecModelType(Constants.AecModelType aecModelType)` Sets the AEC model type.
    `void` | `setAecStartupMaxSuppressTimeInMs(int aecStartupMaxSuppressTimeInMs)` Sets the AEC startup maximum suppression time.
    `void` | `setAecSuppressionMode(Constants.AecSuppressionMode aecSuppressionMode)` Sets the AEC suppression mode.
    `void` | `setAiAecSuppressionMode(Constants.AIAecSuppressionMode aiAecSuppressionMode)` Sets the AI AEC suppression mode.
    `void` | `setEnableAecAutoReset(boolean enableAecAutoReset)` Sets whether to enable the AEC auto-reset.
    `void` | `setEnabled(boolean enabled)` Sets whether to enable AEC.
    `void` | `setFilterLength(Constants.AecFilterLength filterLength)` Sets the AEC filter length.
    `void` | `setStereoAecEnabled(boolean stereoAecEnabled)` Sets whether to enable stereo AEC.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### enabled

          private boolean enabled

      Whether to enable Aec. - true: Enable Aec. - false: (Default) Disable Aec.

    - #### stereoAecEnabled

          private boolean stereoAecEnabled

      Whether to enable stereo Aec. - true: Enable stereo Aec. - false: (Default) Disable stereo Aec.

    - #### enableAecAutoReset

          private boolean enableAecAutoReset

      Whether to enable Aec auto-reset when Aec is unavailable. - true: Enable Aec auto-reset. - false: (Default) Disable Aec auto-reset.

    - #### aecStartupMaxSuppressTimeInMs

          private int aecStartupMaxSuppressTimeInMs

      When Aec is in startup state, an extreme Aec suppression is needed. aecStartupMaxSuppressTimeInMs, measured in milliseconds, is the max time for extreme Aec suppression operation. The value range is [0, (1 << 30) - 1], and default value is (1 << 30) - 1.

    - #### filterLength

          private Constants.AecFilterLength filterLength

      The Aec linear filter length. See `Constants.AecFilterLength`.

    - #### aecModelType

          private Constants.AecModelType aecModelType

      The Aec Model Type. See `Constants.AecModelType`.

    - #### aecSuppressionMode

          private Constants.AecSuppressionMode aecSuppressionMode

      The Aec suppression level. See `Constants.AecSuppressionMode`.

    - #### aiAecSuppressionMode

          private Constants.AIAecSuppressionMode aiAecSuppressionMode

      The AIAec suppression mode. See `Constants.AIAecSuppressionMode`.

  - ### Constructor Detail

    - #### AecConfig

          public AecConfig()

      Constructs an AecConfig with default settings.

    - #### AecConfig

          public AecConfig(boolean enabled,
                           boolean stereoAecEnabled,
                           boolean enableAecAutoReset,
                           int aecStartupMaxSuppressTimeInMs,
                           Constants.AecFilterLength filterLength,
                           Constants.AecModelType aecModelType,
                           Constants.AecSuppressionMode aecSuppressionMode,
                           Constants.AIAecSuppressionMode aiAecSuppressionMode)

      All-args constructor.
      Parameters:
        `enabled` - Whether to enable AEC. `true` to enable, `false` to disable (default).
        `stereoAecEnabled` - Whether to enable stereo AEC. `true` to enable, `false` to disable (default).
        `enableAecAutoReset` - Whether to enable AEC auto-reset when AEC is unavailable. `true` to enable, `false` to disable (default).
        `aecStartupMaxSuppressTimeInMs` - The maximum time in milliseconds for extreme AEC suppression during startup. Value range: [0, (1 << 30) - 1]. Default: (1 << 30) - 1.
        `filterLength` - The AEC linear filter length. See `Constants.AecFilterLength`.
        `aecModelType` - The AEC model type. See `Constants.AecModelType`.
        `aecSuppressionMode` - The AEC suppression level. See `Constants.AecSuppressionMode`.
        `aiAecSuppressionMode` - The AIAEC suppression mode. See `Constants.AIAecSuppressionMode`.

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

      Returns whether AEC is enabled.
      Returns:
        Whether AEC is enabled

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Sets whether to enable AEC.
      Parameters:
        `enabled` - Whether to enable AEC

    - #### isStereoAecEnabled

          public boolean isStereoAecEnabled()

      Returns whether stereo AEC is enabled.
      Returns:
        Whether stereo AEC is enabled

    - #### setStereoAecEnabled

          public void setStereoAecEnabled(boolean stereoAecEnabled)

      Sets whether to enable stereo AEC.
      Parameters:
        `stereoAecEnabled` - Whether to enable stereo AEC

    - #### isEnableAecAutoReset

          public boolean isEnableAecAutoReset()

      Returns whether the AEC auto-reset is enabled.
      Returns:
        Whether AEC auto-reset is enabled

    - #### setEnableAecAutoReset

          public void setEnableAecAutoReset(boolean enableAecAutoReset)

      Sets whether to enable the AEC auto-reset.
      Parameters:
        `enableAecAutoReset` - Whether to enable AEC auto-reset

    - #### getAecStartupMaxSuppressTimeInMs

          public int getAecStartupMaxSuppressTimeInMs()

      Gets the AEC startup maximum suppression time.
      Returns:
        AEC startup max suppress time in milliseconds

    - #### setAecStartupMaxSuppressTimeInMs

          public void setAecStartupMaxSuppressTimeInMs(int aecStartupMaxSuppressTimeInMs)

      Sets the AEC startup maximum suppression time.
      Parameters:
        `aecStartupMaxSuppressTimeInMs` - AEC startup max suppress time in milliseconds

    - #### getFilterLength

          public Constants.AecFilterLength getFilterLength()

      Gets the AEC filter length.
      Returns:
        AEC filter length

    - #### setFilterLength

          public void setFilterLength(Constants.AecFilterLength filterLength)

      Sets the AEC filter length.
      Parameters:
        `filterLength` - AEC filter length

    - #### getAecModelType

          public Constants.AecModelType getAecModelType()

      Gets the AEC model type.
      Returns:
        AEC model type

    - #### setAecModelType

          public void setAecModelType(Constants.AecModelType aecModelType)

      Sets the AEC model type.
      Parameters:
        `aecModelType` - AEC model type

    - #### getAecSuppressionMode

          public Constants.AecSuppressionMode getAecSuppressionMode()

      Gets the AEC suppression mode.
      Returns:
        AEC suppression mode

    - #### setAecSuppressionMode

          public void setAecSuppressionMode(Constants.AecSuppressionMode aecSuppressionMode)

      Sets the AEC suppression mode.
      Parameters:
        `aecSuppressionMode` - AEC suppression mode

    - #### getAiAecSuppressionMode

          public Constants.AIAecSuppressionMode getAiAecSuppressionMode()

      Gets the AI AEC suppression mode.
      Returns:
        AI AEC suppression mode

    - #### setAiAecSuppressionMode

          public void setAiAecSuppressionMode(Constants.AIAecSuppressionMode aiAecSuppressionMode)

      Sets the AI AEC suppression mode.
      Parameters:
        `aiAecSuppressionMode` - AI AEC suppression mode

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`