Spectrogram
spectrogramRender a mel-frequency PNG for a time/frequency window with optional bar lines, ruler, and word markers, returning the image path plus a JSON pixel map for visual audio comparison.
Instructions
Write a mel spectrogram PNG with bar lines (the one non-text view). Returns the PNG path. A picture for the person to look at AND mark is exam_picture_round, not a PNG: they flip between the two and pin what differs. For eyes (zoomed on one sound, to compare two by picture): seconds=[t0, t1] inside bars (or the source), the band f_lo..f_hi Hz, ruler=True (ms from the window start), words=[{'w', 't0', 't1'}] in s. That picture sits on a fixed plot box, so two of the same window line up pixel for pixel, and a .json beside it maps a pixel to (s, Hz). Zoom early, not as a last resort, when: the person names a texture (robotic, digital, bitcrushed, smeared, gargle, old TTS, cut off, pre-delay, reversed, phaser); the numbers say close but the ear says no; the sound is a voice, sung words or a played instrument; two rounds passed without progress; or to see that a fix made its spot fade. Draw the reference and yours on the same window, two ways (a few ms around an edge; a whole word or note for texture; sound_zoom draws both in one picture), and read them one above the other (references/listening.md, "When to zoom"). Where yours differs beyond the reference's own spread: sound_zoom_diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | ||
| bars | No | ||
| f_hi | No | ||
| f_lo | No | ||
| ruler | No | ||
| words | No | ||
| source | No | ||
| project | Yes | ||
| seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |