Draw audio as an image
audio_visualizeRender audio as waveform, spectrogram, chroma, pitch, loudness, or stereo-field PNGs to visually inspect clipping, noise, band limits, repeats, and rhythm.
Instructions
Draws an audio file as a PNG you can look at: waveform, spectrogram, mel spectrogram, constant-Q (cqt), chroma, pitch curve, loudness over time, tempogram, self-similarity (song structure), onset strength, a reassigned spectrogram, or the stereo field as a vectorscope or phase scope. Mel can use PCEN and cqt can be variable-Q (gamma). The reply also carries the axis ranges, dB range and seconds per pixel, and 'save' keeps the PNG as a file. Use it to see what a recording looks like, spot clipping, noise, band limits, repeated sections or rhythm. Do not use it for exact numbers (audio_info, audio_analyze, audio_loudness, audio_pitch, audio_features) or for notes in a MIDI file (midi_visualize). Example: {"path": "song.wav", "kind": "spectrogram", "range": {"start_sec": 0, "end_sec": 30}}.
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>",
"kind": "<kind>"
},
"name": "audio_visualize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | What to draw: waveform (amplitude), spectrogram (log-frequency dB), mel (mel spectrogram), cqt (constant-Q, note axis), chroma (12 pitch classes), pitch (f0 curve), loudness (momentary and short-term LUFS), tempogram (tempo over time), selfSimilarity (time-by-time chroma similarity), onsets (onset strength with detected onsets marked), reassigned (spectrogram with each bin moved to its energy's true time and frequency, sharper than the plain one), vectorscope (stereo field: mid against side) and phaseScope (stereo phase: angle against radius); the two scopes need a stereo file. | |
| path | Yes | Audio file to draw. | |
| pcen | No | With kind mel: draw per-channel energy normalization (PCEN), which flattens loudness and noise differences, instead of dB. | |
| save | No | Also write the PNG as a new file in the output directory (path in 'files'). | |
| gamma | No | With kind cqt: bandwidth offset in Hz of a variable-Q transform, which keeps low notes from smearing in time. Omit for the plain constant-Q transform. | |
| range | No | Draw only this window ({start_sec, end_sec}, in seconds). Omit for the whole file; a window of a few seconds to a minute reads best. | |
| width | No | Image width in pixels (240-1400, default 1200). | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| height | No | Image height in pixels (160-1400, default 480). |