Get the audio waveform of a file
get_audio_waveform_of_fileReduce an audio file to evenly spaced peak values for drawing waveforms or locating loud and quiet sections, with optional RMS levels and max peak data.
Instructions
Reduce a file's audio to a fixed number of peak values (0-1, where 1 is full scale) spread evenly over the analysed time, for drawing a waveform or reasoning about where the loud and quiet parts are. Point i covers the file time from analyzed_start + i * seconds_per_point. Each peak is the highest absolute sample of any channel (up to 8) in that slice. Also returns max_peak and max_peak_db. For exact silent ranges use detect_silence_in_file; for beats use detect_beats_in_file. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.
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": {
"path": "<path>"
},
"name": "get_audio_waveform_of_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Analyse up to this file time, in seconds; clamped to the file's length. Must be greater than start. Default: the end of the file. | |
| path | Yes | Absolute path of the media file on this computer. | |
| start | No | Analyse from this file time (seconds from the start of the file). Default 0. | |
| points | No | How many values to return, 2-4000. Default 200. | |
| include_rms | No | Also return `rms`: the average (RMS) level 0-1 of each slice, which follows perceived loudness better than peaks. Default false. | |
| audio_stream | No | Which audio stream to use, 0-based among the file's audio streams (see probe_media_file). Default 0. | |
| timeout_seconds | No | Stop ffmpeg and fail with TIMEOUT after this many seconds. Default 600. |