Trim a WAV audio file
trim_audioTrim a WAV audio file to a time range with optional fade in and out, returning a 16-bit PCM WAV as base64. Only WAV is accepted; the web UI handles MP3/OGG/M4A.
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": {
"file": "<file>",
"startSec": "<startSec>",
"endSec": "<endSec>"
},
"name": "trim_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| endSec | Yes | Trim end in seconds, after startSec. | |
| startSec | Yes | Trim start in seconds. | |
| fadeInSec | No | Linear fade-in length in seconds. | |
| fadeOutSec | No | Linear fade-out length in seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Trimmed audio as a 16-bit PCM WAV, base64. | |
| bytes | Yes | WAV file size in bytes. | |
| sampleRate | Yes | Sample rate in Hz. | |
| durationSec | Yes | Duration of the trimmed audio in seconds. |