> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# setAutoGainControl

> Toggle browser automatic gain control on the local mic at runtime.

```ts
setAutoGainControl(enabled): Promise<void>
```

Toggle browser automatic gain control on the local mic at runtime.

## **Parameters**

Whether automatic gain control should be enabled.

## **Returns**

`Promise<void>` — resolves once the new constraint has been applied to the active microphone track.

## **Examples**

### Toggle from a UI switch

```ts
agcSwitch.addEventListener('change', async (e) => {
  await call.setAutoGainControl(e.target.checked);
});
```

## **See**

* [`setEchoCancellation`](/docs/browser-sdk/v4/reference/webrtc-call/set-echo-cancellation), [`setNoiseSuppression`](/docs/browser-sdk/v4/reference/webrtc-call/set-noise-suppression) — companion processing toggles.