---
title: "Compress"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/audio/compress
markdown: https://docs.nodetool.ai/nodes/lib/audio/compress.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/audio/compress.md
---

# Compress

**Type:** `lib.audio.Compress`

**Namespace:** `lib.audio`

## Description

Applies dynamic range compression to an audio file.
    audio, effect, dynamics

    Use cases:
    - Even out volume levels in a recording
    - Increase perceived loudness of audio
    - Control peaks in audio signals

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| audio | `audio` | The audio file to process. | `{"type":"audio","uri":"","asset_id":null,"data"...` |
| threshold | `float` | Threshold in dB above which compression is applied. | `-20` |
| ratio | `float` | Compression ratio. Higher values result in more compression. | `4` |
| attack | `float` | Attack time in milliseconds. | `5` |
| release | `float` | Release time in milliseconds. | `50` |
| auto_gain | `bool` | Apply automatic makeup gain to compensate for the level lost to compression, keeping the output roughly as loud as the input. | `true` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `audio` |  |

## Related Nodes

Browse other nodes in the [lib.audio](./) namespace.
