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

# Cancel background noise

> Remove background noise and other voices from the caller's audio before your agent or app hears it.

Callers phone from kitchens, cars and shop floors. A TV in the background, a second person talking
or street noise reaches the transcriber as speech, and your agent answers things nobody said to it.
Noise cancelling cleans the caller's audio before speech recognition and turn detection: it keeps
the person on the call and suppresses noise and other voices around them.

Noise cancelling runs on Fonoster, before your application gets the audio. You turn it on per
application, and nothing in your code changes.

## Turn it on

Noise cancelling is a setting on the application, off by default. It needs a noise-cancelling
provider in your workspace's catalog. Fonoster Cloud offers [ai-coustics](https://ai-coustics.com);
a self-hosted install offers it once the operator adds the provider (see
[Turn-taking and audio](https://docs.fonoster.com/self-hosting/turn-taking-and-audio.md)).

**Dashboard**

* **App**: go to **Apps**, open the app, go to the **Call handling** tab, and pick a provider
  under **Noise cancelling**.
* **Autopilot agent**: open the agent, go to the **Advanced** tab, and pick a provider in the
  **Noise cancelling** panel.

Choose **Save**. The list shows **None** and every noise-cancelling provider your workspace can
use. If it shows **None** only, no provider is available to the workspace yet.

**SDK**

Set `filters` when you create or update the application. An update replaces the whole
application, so read it first, change `filters`, and send all of it back:

```javascript theme={"system"}
const apps = new SDK.Applications(client);
const app = await apps.getApplication("4b01c9b1-8cb1-48fb-bd49-f3daf13463a9");
await apps.updateApplication({
  ...app,
  filters: [{ name: "aiCoustics" }]
});
```

An empty list turns it off.

**CLI**

Name the provider with `--noise-cancelling`:

```bash theme={"system"}
fonoster applications:update 4b01c9b1-8cb1-48fb-bd49-f3daf13463a9 --noise-cancelling aicoustics
```

`--noise-cancelling none` turns it off.

Each filter in `filters` has a `name` and optional `options`:

| Field | Default | What it does |
| - | - | - |
| `name` | | The filter. `aiCoustics` is the ai-coustics Voice Focus model. |
| `options.enhancementLevel` | `1` | How much to suppress, from `0` to `1`. Lower values keep more of the room; higher values cut competing speech harder. |
| `options.bypass` | `false` | Keeps the filter in place but stops enhancing. Useful to compare calls with and without it. |

The dashboard sets the filter with its defaults. Use the SDK or the CLI's `--from-file` to change
`enhancementLevel`.

## What to expect

* **One speaker.** The filter locks onto the main voice and suppresses the rest. That is what you
  want for a person on a handset. It is wrong for speakerphone calls with several people, for a
  phone menu that answers your outbound call, and for hold music. Turn it off on applications that
  take those calls.
* **A little delay.** Filtering adds about 30 milliseconds to the caller's audio.
* **Recordings are not filtered.** Call recordings keep the audio as it arrived. Only what the
  transcriber and your application hear is filtered.
* **Twilio-compatible apps too.** The filter runs before the audio reaches your app, whatever the
  protocol.

## Bring your own key

Fonoster Cloud runs the filter on the platform's ai-coustics account. To run it on your own
account, add an ai-coustics key on the **Vendor keys** page, the same way as a speech or
language-model key. Your workspace's calls then use it. See
[Use your own vendor keys](https://docs.fonoster.com/workspace/provider-keys.md).

## When it can't run

Noise cancelling never drops a call. If the filter can't start, for example because the provider
rejected the key, or if it fails during a call, the call goes on with the caller's audio as it
arrived. The call's [call record](https://docs.fonoster.com/observe/call-records.md) notes it, and the call's page in the
dashboard shows an **Unfiltered** badge with the reason.

## Next steps

> **[Use your own vendor keys](https://docs.fonoster.com/workspace/provider-keys.md)**
>
> Run the filter on your own ai-coustics account.

> **[Call records](https://docs.fonoster.com/observe/call-records.md)**
>
> See which calls ran unfiltered, and why.

> **[Detect answering machines](https://docs.fonoster.com/telephony/amd.md)**
>
> Another per-application setting for the first seconds of a call.

> **[Turn-taking](https://docs.fonoster.com/autopilot/turn-taking.md)**
>
> How clean audio feeds turn detection.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.