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

# Sanas

> Use the Sanas noise cancellation denoiser in a Zero Runtime pipeline. Setup and usage in Python and JavaScript.

Sanas is a professional **noise cancellation** denoiser. Unlike the local
[RNNoise](/runtime-sdk/plugins/denoise/rnnoise) plugin, Sanas runs server-side over the Zero Runtime
**inference gateway**, so it needs a gateway auth token. It occupies the pipeline's
`denoise` slot, cleaning the caller's audio before the rest of the pipeline runs.

## Setup

The denoiser connects to the inference gateway using your Zero Runtime auth token:

```bash theme={null}
export ZERORUNTIME_AUTH_TOKEN=<token>
```

The token can also be passed explicitly to the factory.

## Usage

Build the denoiser with `SanasDenoise` and pass it to the pipeline's
`denoise` slot.

<CodeGroup>
  ```python Python theme={null}
  from zeroruntime.inference import SanasDenoise

  denoise = SanasDenoise(model_id="VI_G_NC3.0")

  # Pipeline(denoise=denoise, ...)
  ```

  ```typescript Node JS theme={null}
  import { SanasDenoise } from '@zeroruntime/js-sdk/inference';

  const denoise = SanasDenoise({ model_id: 'VI_G_NC3.0' });

  // Pipeline({ denoise, ... })
  ```
</CodeGroup>

## Parameters

*Parameters for `SanasDenoise`.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model_id` | `str` | `"VI_G_NC3.0"` | Sanas noise-cancellation model. |
| `sample_rate` | `int` | `16000` | Audio sample rate (Hz) the model expects. |
| `chunk_ms` | `int` | `20` | Audio chunk size in milliseconds. |
| `gateway_token` | `str` | `None` | Auth token for the inference gateway. Falls back to `ZERORUNTIME_AUTH_TOKEN`. |
| `base_url` | `str` | `None` | Override the inference gateway URL. |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Python | `from zeroruntime.inference import SanasDenoise` | `SanasDenoise(...)` |
| Node JS | `import { SanasDenoise } from '@zeroruntime/js-sdk/inference'` | `SanasDenoise({ ... })` |

Noise cancellation runs first, so [voice activity detection](/runtime-sdk/plugins/vad/silero) and
[speech-to-text](/runtime-sdk/plugins/stt/deepgram) see cleaner audio.


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