# clip.remove_silences

> Cuts the silences out of a clip or audio item, one item per speech stretch.

Source: https://stuarty.com/docs/mcp/tools/edit/clip.remove_silences/

Replaces the clip or audio item by one item per non-silent stretch of its source range. Silences shorter than min_silence are kept; padding of speech is kept on each side of a cut. With ripple track the pieces close up and the later items of the track follow. The silences come from the analysis of the asset and are supplied by the service in resolved; the command never starts a job. Captions linked to the clip move their link to the piece that holds their first word.

## Arguments

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `item_id` | `string` | yes | A clip of a video asset with audio, or an audio item.; pattern `^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$` |
| `min_silence` | `string` | no | A length; shorter silences are ignored. Default "0.4s". |
| `new_ids` | array of `string` | no | Ids for the second, third, ... pieces, in order. |
| `padding` | `string` | no | A length, may be 0; speech kept around each cut. Default "0.1s". |
| `ripple` | `track`, `none` | no | Track (default) or none. |
| `threshold_db` | `integer` | no | Noise level of silence: -30, -35 (default), -40 or -45. |

## Errors

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)
- [`E_INVALID_TIME`](/docs/reference/error-codes#e_invalid_time)
- [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found)
- [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch)
- [`E_ID_EXISTS`](/docs/reference/error-codes#e_id_exists)
- [`E_INVALID_STATE`](/docs/reference/error-codes#e_invalid_state)
- [`E_LIMIT`](/docs/reference/error-codes#e_limit)

## Scope

Scope `edit`. The scope is the one an API key needs in network mode. Run `stuarty command:help clip.remove_silences` for the same description from the binary, or call the [`command_help`](/docs/mcp/tools/command_help) tool.

## Next steps

- [The edit tool](/docs/mcp/tools/edit)
- [Batches, revisions and idempotency](/docs/agents/batches)

**As an MCP call**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "edit",
    "arguments": {
      "project_id": "prj_7k2m9x4q1b",
      "base_revision": 12,
      "operations": [
        {
          "op": "clip.remove_silences",
          "args": {
            "item_id": "itm_m1n2p3q4r5",
            "min_silence": "0.4s",
            "padding": "0.1s",
            "ripple": "track"
          }
        }
      ]
    }
  }
}
```

**As a batch file for the CLI**

```json
[
  {
    "op": "clip.remove_silences",
    "args": {
      "item_id": "itm_m1n2p3q4r5",
      "min_silence": "0.4s",
      "padding": "0.1s",
      "ripple": "track"
    }
  }
]
```

```bash
stuarty edit --project prj_7k2m9x4q1b --ops batch.json --json
```

**Over HTTP**

```bash
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "base_revision": 12,
  "operations": [
    {
      "op": "clip.remove_silences",
      "args": {
        "item_id": "itm_m1n2p3q4r5",
        "min_silence": "0.4s",
        "padding": "0.1s",
        "ripple": "track"
      }
    }
  ]
}'
```

The ids in the example are illustrative: read the real ones with `project_get`.
