Spectrogram Explained

A spectrogram is a visual representation of the spectrum of frequencies of a signal as it varies with time. When applied to an audio signal, spectrograms are sometimes called sonographs, voiceprints, or voicegrams. When the data are represented in a 3D plot they may be called waterfall displays.

Spectrograms are used extensively in the fields of music, linguistics, sonar, radar, speech processing,[1] seismology, ornithology, and others. Spectrograms of audio can be used to identify spoken words phonetically, and to analyse the various calls of animals.

A spectrogram can be generated by an optical spectrometer, a bank of band-pass filters, by Fourier transform or by a wavelet transform (in which case it is also known as a scaleogram or scalogram).[2]

A spectrogram is usually depicted as a heat map, i.e., as an image with the intensity shown by varying the colour or brightness.

Format

A common format is a graph with two geometric dimensions: one axis represents time, and the other axis represents frequency; a third dimension indicating the amplitude of a particular frequency at a particular time is represented by the intensity or color of each point in the image.

There are many variations of format: sometimes the vertical and horizontal axes are switched, so time runs up and down; sometimes as a waterfall plot where the amplitude is represented by height of a 3D surface instead of color or intensity. The frequency and amplitude axes can be either linear or logarithmic, depending on what the graph is being used for. Audio would usually be represented with a logarithmic amplitude axis (probably in decibels, or dB), and frequency would be linear to emphasize harmonic relationships, or logarithmic to emphasize musical, tonal relationships.

Generation

Spectrograms of light may be created directly using an optical spectrometer over time.

Spectrograms may be created from a time-domain signal in one of two ways: approximated as a filterbank that results from a series of band-pass filters (this was the only way before the advent of modern digital signal processing), or calculated from the time signal using the Fourier transform. These two methods actually form two different time–frequency representations, but are equivalent under some conditions.

The bandpass filters method usually uses analog processing to divide the input signal into frequency bands; the magnitude of each filter's output controls a transducer that records the spectrogram as an image on paper.[3]

Creating a spectrogram using the FFT is a digital process. Digitally sampled data, in the time domain, is broken up into chunks, which usually overlap, and Fourier transformed to calculate the magnitude of the frequency spectrum for each chunk. Each chunk then corresponds to a vertical line in the image; a measurement of magnitude versus frequency for a specific moment in time (the midpoint of the chunk). These spectrums or time plots are then "laid side by side" to form the image or a three-dimensional surface,[4] or slightly overlapped in various ways, i.e. windowing. This process essentially corresponds to computing the squared magnitude of the short-time Fourier transform (STFT) of the signal

s(t)

— that is, for a window width

\omega

,

spectrogram(t,\omega)=\left|STFT(t,\omega)\right|2

.[5]

Limitations and resynthesis

From the formula above, it appears that a spectrogram contains no information about the exact, or even approximate, phase of the signal that it represents. For this reason, it is not possible to reverse the process and generate a copy of the original signal from a spectrogram, though in situations where the exact initial phase is unimportant it may be possible to generate a useful approximation of the original signal. The Analysis & Resynthesis Sound Spectrograph[6] is an example of a computer program that attempts to do this. The Pattern Playback was an early speech synthesizer, designed at Haskins Laboratories in the late 1940s, that converted pictures of the acoustic patterns of speech (spectrograms) back into sound.

In fact, there is some phase information in the spectrogram, but it appears in another form, as time delay (or group delay) which is the dual of the instantaneous frequency.[7]

The size and shape of the analysis window can be varied. A smaller (shorter) window will produce more accurate results in timing, at the expense of precision of frequency representation. A larger (longer) window will provide a more precise frequency representation, at the expense of precision in timing representation. This is an instance of the Heisenberg uncertainty principle, that the product of the precision in two conjugate variables is greater than or equal to a constant (B*T>=1 in the usual notation).[8]

Applications

See also

External links

Notes and References

  1. JL Flanagan, Speech Analysis, Synthesis and Perception, Springer- Verlag, New York, 1972
  2. Sejdic. E.. Djurovic. I.. Stankovic. L.. August 2008. Quantitative Performance Analysis of Scalogram as Instantaneous Frequency Estimator. IEEE Transactions on Signal Processing. 56. 8. 3837–3845. 10.1109/TSP.2008.924856. 2008ITSP...56.3837S. 16396084. 1053-587X.
  3. Web site: Spectrograph. www.sfu.ca. 7 April 2018.
  4. Web site: Spectrograms. ccrma.stanford.edu. 7 April 2018.
  5. Web site: STFT Spectrograms VI – NI LabVIEW 8.6 Help. zone.ni.com. 7 April 2018.
  6. Web site: The Analysis & Resynthesis Sound Spectrograph. arss.sourceforge.net. 7 April 2018.
  7. Boashash . B. . Estimating and interpreting the instantaneous frequency of a signal. I. Fundamentals . Proceedings of the IEEE . Institute of Electrical and Electronics Engineers (IEEE) . 80 . 4 . 1992 . 0018-9219 . 10.1109/5.135376 . 520–538.
  8. Web site: Heisenberg Uncertainty Principle . 2019-02-05 . 2019-01-25 . https://web.archive.org/web/20190125182117/http://fourier.eng.hmc.edu/e161/lectures/fourier/node2.html . dead .
  9. Web site: BIRD SONGS AND CALLS WITH SPECTROGRAMS (SONOGRAMS) OF SOUTHERN TUSCANY (Toscana – Italy). www.birdsongs.it. 7 April 2018.
  10. A wearable tactile sensory aid for profoundly deaf children. Frank A.. Saunders. William A.. Hill. Barbara. Franklin. 1 December 1981. Journal of Medical Systems. 5. 4. 265–270. 10.1007/BF02222144. 7320662. 26620843.
  11. Web site: Spectrogram Reading. ogi.edu. 7 April 2018. dead. https://web.archive.org/web/19990427185722/http://cslu.cse.ogi.edu/tutordemos/SpectrogramReading/spectrogram_reading.html . 27 April 1999.
  12. Web site: Praat: doing Phonetics by Computer. www.fon.hum.uva.nl. 7 April 2018.
  13. Web site: The Aphex Face – bastwood. www.bastwood.com. 7 April 2018.
  14. Web site: SRC Comparisons. src.infinitewave.ca. 7 April 2018.
  15. Web site: constantwave.com – constantwave Resources and Information.. www.constantwave.com. 7 April 2018.
  16. Web site: Spectrograms for vector network analyzers . https://web.archive.org/web/20120810020043/http://www.constantwave.com/spectro_vna.aspx . 2012-08-10 . dead .
  17. Web site: Real-time Spectrogram Displays. earthquake.usgs.gov. 7 April 2018.
  18. Web site: IRIS: MUSTANG: Noise-Spectrogram: Docs: v. 1: Help.
  19. Web site: Machine Learning is Fun Part 6: How to do Speech Recognition with Deep Learning. Geitgey. Adam. 2016-12-24. Medium. 2018-03-21.
  20. See also Praat.
  21. News: November 23, 2023 . China's enormous surveillance state is still growing . . subscription . 2023-11-25 . 0013-0613.
  22. Web site: What is a Spectrogram? . 2023-12-18.
  23. Multi-channel spectrograms for speech processing applications using deep learning methods. Arias-Vergara . T. . Klumpp. P.. Vasquez-Correa. J. C.. Nöth. E. . Orozco-Arroyave. J. R. . Schuster . M. . 2021. Pattern Analysis and Applications. 24 . 2 . 423–431 . 10.1007/s10044-020-00921-5 . free.
  24. Speaker recognition based on characteristic spectrograms and an improved self-organizing feature map neural network. Yanjie . Jia . Xi. Chen. Jieqiong. Yu. Lianming. Wang. Yuanzhe. Xu . Shaojin . Liu . Yonghui . Wang . 2021. Complex & Intelligent Systems. 7 . 4 . 1749–1757 . 10.1007/s40747-020-00172-1 . free.
  25. Spectrogram analysis of ECG signal and classification efficiency using MFCC feature extraction technique. Arpitha . Yalamanchili . G. L.. Madhumathi . N.. Balaji . 2022. Journal of Ambient Intelligence and Humanized Computing. 13 . 2 . 757–767 . 10.1007/s12652-021-02926-2 . 233657057 .
  26. Temperature interpretation method for temperature indicating paint based on spectrogram. Junfeng . Ge . Li. Wang . Kang. Gui . Lin. Ye . 30 September 2023. Measurement. 219 . 10.1016/j.measurement.2023.113317 . 2023Meas..21913317G . 259871198 .
  27. Classification of Respiratory States Using Spectrogram with Convolutional Neural Network. Cheolhyeong . Park . Deokwoo. Lee . 11 February 2022. Applied Sciences. 12 . 4 . 1895 . 10.3390/app12041895 . free .