Split audio into several files
audio_splitCuts audio into multiple files at specified times, silences, song sections, or every N bars/beats; also splits several takes together at shared silent stretches.
Instructions
Cuts one audio file into several files at given times, at silences, at detected song sections, or every N bars or beats of the detected beat grid; a trailing remainder joins the last file, and all files are written or none are. Several takes of one part ('paths') are cut together at the stretches where all of them are silent. Use it to chop a recording into tracks, slice a song into 4-bar loops, or separate takes. Do not use it to keep one window (use audio_edit trim), to join files (use project_create with layout sequence) or to separate instruments (use audio_separate). Example: {"path": "session.wav", "by": "silence", "top_db": 45}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"by": "<by>"
},
"name": "audio_split"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | How to find the cut points: 'times' (the given seconds), 'silence' (one file per non-silent stretch), 'sections' (detected song sections), 'bars' or 'beats' (every N bars / beats of the detected grid). | |
| path | No | Input audio file (wav, flac, mp3, ogg, aiff, ...). Give this or 'paths'. | |
| paths | No | Several takes of one part (same sample rate), cut together at the stretches where every take is silent, so a cut never lands inside a phrase of any take. Needs by='silence'; one file per take and stretch is written. Give this or 'path'. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| format | No | Output format: wav, flac, ogg (Vorbis), opus, mp3, aiff, or m4a (AAC, needs ffmpeg). Default: the explicit output's extension, else the input's format, else wav. | |
| prefix | No | File name prefix; files are named '<prefix>.<tool>.<part>.<ext>'. Default: the input's stem. | |
| top_db | No | For by='silence': dB below the peak that counts as silence (default 40). | |
| dry_run | No | Report the resolved output plan and paths without processing or writing. | |
| quality | No | Lossy encoder setting for ogg/opus/mp3, 0..1 (soundfile compression_level, variable bit rate): 0 = best quality, 1 = smallest file. On 48 kHz stereo music, mp3 0 / 0.3 / 1 is about 192 / 120 / 55 kbit/s (no 320 kbit/s setting), ogg about 330 / 150 / 45 and opus about 510 / 360 / 13. Default 0.3. Excludes bit_depth. | |
| from_bar | No | For by='bars': bar at which counting starts, numbered as audio_analyze numbers bars: whole bars count from 1 and an incomplete opening bar is 0. Audio before it becomes its own file, except a bar 0 before from_bar 1, which joins the first file (default 1). | |
| bit_depth | No | PCM bit depth for wav/flac/aiff: 16, 24 or 'float32' (32-bit float; not flac). Default: the input's depth, else 24. Excludes quality. | |
| overwrite | No | Replace an existing output file. Without it an existing file is an error. | |
| times_sec | No | For by='times': increasing cut points inside the audio, in seconds. | |
| output_dir | No | Directory for the output files. Default: the output directory. | |
| every_count | No | For by='bars' / 'beats': a file every this many bars / beats (default 4). | |
| sample_rate | No | Output sample rate in Hz; the audio is resampled when it differs. Default: the input's rate. Opus is always 48000. |