> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inworld AEC Module

[Overview](../overview) > Inworld AEC Module

**Class:** `InworldAECModule` | **Inherits from:** `InworldFrameworkModule`

Module for Acoustic Echo Cancellation (AEC) within the Inworld framework. Processes audio streams to remove echo and feedback from microphone input. Uses CPU-based local processing only and does not support remote operation. Essential for clear audio communication in applications with both input and output audio.

> **Important:** This module must be executed with a LocalCPU model. Remote operation is not supported.

## Methods

* [CreateFactory](#createfactory)
* [SetupConfig](#setupconfig)
* [FilterAudio](#filteraudio)

## Reference

### CreateFactory

Creates and returns an AECFactory for this module.

#### Returns

**Type:** `InworldFactory`

**Description:** A factory instance for creating acoustic echo cancellation objects.

***

### SetupConfig

Sets up the configuration for acoustic echo cancellation operations.
Only supports local CPU processing; remote operation is not available.

#### Returns

**Type:** `InworldConfig`

**Description:** An AEC configuration instance for module initialization, or null if remote mode is attempted.

***

### FilterAudio

Filters audio to remove echo and feedback using acoustic echo cancellation.
Processes both near-end (microphone) and far-end (speaker) audio to produce clean output.

#### Parameters

| Parameter | Type         | Description                                           |
| --------- | ------------ | ----------------------------------------------------- |
| nearend   | `AudioChunk` | The microphone audio input that may contain echo.     |
| farend    | `AudioChunk` | The speaker audio output that creates potential echo. |

#### Returns

**Type:** `AudioChunk`

**Description:** The filtered audio chunk with echo removed, or null if processing failed.

***
