OptionalalphaOptionalautoPraat-style autoscaling: map the loudest bin of the computed spectrogram (found after pre-emphasis) to the last colormap entry and everything rangeDB below it to the first, instead of using the fixed gainDB white point. gainDB is ignored while enabled. With splitChannels, a single maximum serves all channels, so inter-channel level differences are preserved (a quieter channel renders lighter); per-channel scaling was rejected to keep channels comparable. If the whole signal is digital silence, the spectrogram is left blank instead of amplifying the numeric floor. SpectrogramPlugin only - the windowed variant computes segments lazily and has no global maximum. No effect with frequenciesDataUrl. (default: false)
OptionalbufferWindowed rendering only. Accepted for backward compatibility with WindowedSpectrogramPlugin's option shape; not currently read by the windowing algorithm (see windowSize above).
OptionalcolorA 256 long array of 4-element arrays. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha.
OptionalcontainerSelector of element or element in which to render
OptionalfallbackWhether a failed or timed-out worker calculation silently recomputes the FFT on the main thread. The default keeps that historical behavior. Set to false to emit an 'error' event and skip rendering instead - on long files a main-thread FFT can freeze the page, which is usually worse than a missing spectrogram. After a worker failure the worker is re-created on the next render either way. Only applies when useWebWorker is true and a worker could actually be created; environments without Worker support always compute on the main thread. (default: true)
OptionalfftNumber of samples per analysis window. Must be a power of 2, unless fftSize is set (then any integer from 2 to fftSize).
OptionalfftLength of the zero-padded FFT, in samples. Must be a power of two, and at least fftSamples. When set, each fftSamples-long analysis window is zero-padded to fftSize before the FFT, which only adds interpolated frequency bins (fftSize / 2 in total) - it does not improve the true frequency resolution, and the time resolution (window and hop) is unchanged. Same split as win_length vs n_fft in librosa/scipy or AnalyserNode.fftSize. When fftSize is set, fftSamples may be any integer from 2 up to fftSize (the power-of-two requirement moves to fftSize). (default: fftSamples)
OptionalfrequenciesURL with pre-computed spectrogram JSON data, the data must be a Uint8Array[][].
'full' mode only (the default rendering value) - ignored with rendering: 'windowed',
which computes and caches frequency data lazily per on-screen segment instead of as one
whole-buffer result up front; there's no single whole-buffer draw for pre-computed data to
feed. See loadFrequenciesData's own doc comment for the same rationale.
OptionalfrequencyMax frequency to scale spectrogram. Set this to samplerate/2 to draw whole range of spectrogram.
OptionalfrequencyMin frequency to scale spectrogram.
OptionalgainIncreases / decreases the brightness of the display. For small signals where the display is mostly "blue" (dark) you can increase this value to see brighter colors and give more detail. If the display has too much "white", decrease this value. The default is 20dB and corresponds to a -20 dB signal at a particular frequency being displayed as "white".
OptionalheightHeight of the spectrogram view in CSS pixels
OptionallabelsSet to true to display frequency labels.
OptionallabelsOptionallabelsOptionallabelsOptionalmaxMaximum width of individual canvas elements in pixels (default: 30000)
OptionalnoverlapSize of the overlapping window, in samples. Must be < fftSamples; larger values are clamped to fftSamples - 1 (the hop size always stays >= 1 sample). Auto deduced from canvas size by default.
OptionalprePraat-style display pre-emphasis in dB per octave, applied before quantization: each bin gets preEmphasis * log2(binHz / 1000) dB - 0 dB at 1 kHz, boosting higher frequencies and attenuating lower ones (Praat's default is 6). Counteracts the natural ~-6 dB/oct spectral slope of speech so formants above 1 kHz stay visible. Set 0 to disable. Only applies when frequencies are computed from audio, not to pre-computed frequenciesDataUrl data. (default: 0)
OptionalprogressiveWindowed rendering only. Enable progressive background loading of the whole buffer, segment by segment, beyond just what's visible. Emits 'progress' events as it goes. (default: false)
OptionalrangeAffects the range of signal sizes that will be displayed as colors. The default is 80 dB and means that you will not see anything for signals 80 dB below the value set for "Gain".
OptionalrenderingRendering strategy. 'full' (the default) computes and draws the whole spectrogram up front, paginated across a handful of fixed-size canvases. 'windowed' instead keeps a sliding window of lazily-computed, viewport-anchored segments in memory - constant memory regardless of audio length, at the cost of the autoGain/frequenciesDataUrl features (see their own doc comments) and the windowed-only options below. This is the same rendering windowed's dedicated (now deprecated) WindowedSpectrogramPlugin has always used - it's a thin option-mapping shim over this same setup with rendering: 'windowed'. (default: 'full')
OptionalsampleSample rate of the audio when using pre-computed spectrogram data. Required when using frequenciesDataUrl.
OptionalscaleBased on: https://manual.audacityteam.org/man/spectrogram_settings.html
OptionalsplitRender a spectrogram for each channel independently when true.
OptionaluseUse web worker for FFT calculations (default: false)
OptionalwindowThe window function to be used.
OptionalwindowWindowed rendering only. Accepted for backward compatibility with WindowedSpectrogramPlugin's option shape; not currently read by the windowing algorithm (segment sizing is driven by zoom level and container width instead - see spectrogram-windowing.ts's generateSegments).
OptionalworkerMax time in milliseconds to wait for the web worker FFT result before the calculation is rejected (and falls back to the main thread). Set to 0 to disable the timeout. Only used when useWebWorker is true. (default: 30000)
Some window functions have this extra value. (Between 0 and 1)