Extract audio features (MFCC, chroma, spectral)
audio_featuresCompute music-information-retrieval features like MFCC, chroma, spectral centroid and tempogram at the file's own sample rate, returning statistics, time series, or exported matrices for timbre comparisons and custom scripts.
Instructions
Computes music-information-retrieval features at the file's own sample rate: spectral centroid, bandwidth, rolloff, flatness and contrast, zero-crossing rate, RMS, MFCC and its deltas, four chroma variants, tonnetz, onset strength (also per band), spectral flux, polynomial features, PLP, several tempogram forms and an octave-band spectrum over time. Returns statistics (mean, std, p10, p50, p90), a time series at a chosen resolution, or exports the full matrices as npy or csv files in the output directory for further processing. Use it for brightness/timbre comparisons and as input to your own scripts. Do not use it for loudness (audio_loudness), tempo or key (audio_analyze) or to look at a spectrogram (audio_visualize). Example: {"path": "take.wav", "features": ["mfcc", "chroma"], "aggregate": "export", "export_format": "csv"}.
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": "audio_features"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Audio file to compute features for. | |
| range | No | Analyze only this window ({start_sec, end_sec}, in seconds); times in the result stay on the file's own timeline. Omit for the whole file. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| features | No | Features: centroid, bandwidth, rolloff, flatness, contrast, zcr, rms, mfcc, mfccDelta, chroma, chromaCqt, chromaCens, nnlsChroma, bassChroma, tonnetz, onsetStrength, onsetStrengthMulti, spectralFlux, poly, plp, tempogram, fourierTempogram, cyclicTempogram, tempogramRatio, spectrum (octave-band level in dB over time, floored 80 dB below its loudest cell like the mel view). Defaults to centroid, bandwidth, rolloff, flatness, zcr, rms. | |
| aggregate | No | stats: mean/std/p10/p50/p90 per feature (and per row for mfcc, chroma, ...); series: values over time at 'resolution'; export: write the full matrices to files. | stats |
| resolution | No | Series density for aggregate series: coarse 0.5, medium 1, fine 4 points/s. | medium |
| export_format | No | File type for aggregate export: npy (float32 array, rows x frames) or csv. | npy |
| tempogram_mode | No | Tempogram method for tempogram: autocorrelation or cosine. Omit for the library default (autocorrelation). |