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

# Noise Cancellation

## Overview

A voice agent is only as good as the audio it hears. If the transcription gets a word wrong, everything after it is wrong too.

Noise cancellation cleans the audio before any of that happens, which means you're not fixing errors later, you're not creating them in the first place.

## **This is where things actually go wrong**

Voice agents run over phone calls. Compressed audio, people in cars, call centre background noise, street noise, speakerphones. On those calls the model isn't the problem. The audio reaching it is. Swapping to a better transcription model won't help much if what arrives is already unclear.

### **It works with any model you're already using**

Noise cancellation runs before transcription, so it improves whichever model you're on, including your own key. Nothing else in your setup has to change.

## How to use it:

You need to include a header in your request to activate the Noise cancellation to any model used in our gateway.

```shellscript theme={null}
"X-Slng-Noise-Cancellation": "ai-coustics"
```

Here's an example of the headers for a request using Deepgram Nova 3 in Australia:

<CodeGroup>
  ```javascript WSS theme={null}
  const url =
    "wss://au.api.slng.ai/v1/stt/slng/deepgram/nova:3-en?language=en";

  const socket = new WebSocket(url, {
    headers: {
      Authorization: `Bearer ${process.env.SLNG_TOKEN}`,
      "X-Slng-Noise-Cancellation": "ai-coustics",
    },
  });
  ```

  ```shellscript HTTP theme={null}
  curl --request POST \
    --url https://au.api.slng.ai/v1/stt/slng/deepgram/nova:3-en \
    --header 'Authorization: Bearer <token>' \
    --header 'X-Slng-Noise-Cancellation: ai-coustics'\
    --header 'Content-Type: multipart/form-data' \
    --form audio='@example-file' \
    --form language=en
  ```
</CodeGroup>

## SLNG models

Noise cancellation works with every STT model in the [SLNG catalog](/models/catalog/all-models). Use your SLNG API key or project credentials and set the header, nothing else needed.

## BYOK

Noise cancellation also works when you bring your own provider key, as long as the model is one we support. Same header, same behaviour. You have a guide for [BYOK models](/guides/models/bring-your-own-key) here.

## Regions

Noise Cancellation happens in the region where is invoked, your Speech is never processed or hosted in another region.
