Audio Spectrogram
Audio Spectrogram
The spectrum of a signal shows how the signal can be decomposed into its constituent sinusoidal elements. This is typically shown as a plot of frequency (on the horizontal axis) versus magnitude (on the vertical axis). Missing from this description is the idea that the signal may change as time passes: speech changes rapidly from syllable to syllable, music changes with each new phrase, most things do indeed change with time. This can be captured using the short-time Fourier transform (STFT), which breaks a signal apart into small pieces and analyzes the pieces with the standard Fourier method. The output of the STFT is plotted as a spectrogram: time moves on the horizontal axis, frequency is on the vertical axis, and magnitude is shown by color (usually hue or brightness). This Demonstration provides a concise spectrogram function and applies it to the sounds in the Wolfram-curated dataset.