# Trim Audio

> Cut a section out of an audio file by start and end time, and save it as MP3, WAV or AAC. Keep only the part of a recording or song that the next node needs.

Source: https://nodaro.ai/docs/nodes/audio/trim-audio

The **Trim Audio** node cuts a section out of an audio file. You set a start and an end time in seconds, choose MP3, WAV or AAC, and the node returns the trimmed audio. Leave both times empty to keep the whole file in the new format.

- Found in: Audio › Edit Audio
- Output: audio
- API type: `trim-audio`

## When to use it
- Keep one section of a podcast or a music track.
- Cut out one voice segment to re-voice or process it.
- Shorten a generated song to the length of a video.
- Save a file as WAV before an AI node, or as MP3 to make it smaller.

## Quick start
### Add the node

Press Tab on the canvas and choose **Audio › Edit Audio › Trim Audio**.

### Wire the audio

Wire an audio node into the **Audio** input. For the sound of a video, wire the video through [Extract Audio](https://nodaro.ai/docs/nodes/video/extract-audio) first.

### Set the section

Open the settings panel and set **Start Time (s) — optional** and **End Time (s) — optional**. Choose the **Audio Format**.

### Run it

Click **Run** on the node. The trimmed audio appears on the node with a player.

Workflow: A generated song is cut to the first 15 seconds and merged onto a video.

- Suno Create Music → Trim Audio (audio)
- Trim Audio → Merge Video & Audio (audio)
- Generate Video → Merge Video & Audio (video)

## Input and output
| Input | Accepts | What it does |
| --- | --- | --- |
| **Audio** | Audio nodes, such as Upload Audio, Text to Speech and Extract Audio | The audio to trim. |

The output, **Audio**, is the trimmed audio in the chosen format.

## Settings
| Setting | What it does |
| --- | --- |
| **Audio Format** | **MP3** (the default), **WAV** or **AAC**. |
| **Start Time (s) — optional** | Where the section starts, in seconds. Empty means the beginning of the file. |
| **End Time (s) — optional** | Where the section ends, in seconds. Empty means the end of the file. |

## Tips
- **Use WAV before AI nodes.** WAV keeps the highest quality for nodes such as [Voice Changer](https://nodaro.ai/docs/nodes/audio/voice-changer) and [Forced Alignment](https://nodaro.ai/docs/nodes/audio/forced-alignment).
- **Use MP3 for small files.** Choose MP3 when quality is less critical.
- **Join sections back together.** To put several trimmed sections one after another, use [Combine Audio](https://nodaro.ai/docs/nodes/audio/combine-audio), which can also trim each segment.

## From the API
`POST /v1/trim-audio` takes `audioUrl` or `videoUrl`, plus the optional `startTime`, `endTime` and `audioFormat` (`mp3`, `wav` or `aac`). With a video link, it extracts and trims the video's sound. The MCP tool is `trim_audio`. See [Voice and media](https://nodaro.ai/docs/developers/api/voice-and-media).

## Frequently asked questions

### How do I cut a clip out of an audio file?

Wire the audio into Trim Audio and set Start Time and End Time in seconds. The node returns only that section.

### What happens if I leave the start and end times empty?

The node returns the whole file in the chosen Audio Format. An empty start means the beginning of the file, and an empty end means the end of the file.

### Which format should I choose?

Choose WAV for the highest quality, especially before AI nodes such as Voice Changer and Forced Alignment. Choose MP3 when a small file matters more. AAC is also available.

### How do I trim the sound of a video?

Wire the video through Extract Audio first, then trim the extracted audio. Through the API, Trim Audio also accepts a video link directly.
