最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Understanding the Mel Spectrogram

2022-11-28 12:24 作者:絕代膠片  | 我要投稿

Signals

A?signal?is a variation in a certain quantity over time. For audio, the quantity that varies is air pressure. How do we capture this information digitally? We can take samples of the air pressure over time. The rate at which we sample the data can vary, but is most commonly 44.1kHz, or 44,100 samples per second. What we have captured is a?waveform?for the signal, and this can be interpreted, modified, and analyzed with computer software.

The Fourier Transform

An audio signal is comprised of several single-frequency sound waves. When taking samples of the signal over time, we only capture the resulting amplitudes. The?Fourier transform?is a mathematical formula that allows us to decompose a signal into it’s individual frequencies and the frequency’s amplitude. In other words, it converts the signal from the time domain into the frequency domain. The result is called a?spectrum.

This is possible because every signal can be decomposed into a set of sine and cosine waves that add up to the original signal. This is a remarkable theorem known as?Fourier’s theorem.

The Spectrogram

The fast Fourier transform is a powerful tool that allows us to analyze the frequency content of a signal, but what if our signal’s frequency content varies over time? Such is the case with most audio signals such as music and speech. These signals are known as?non periodic?signals. We need a way to represent the spectrum of these signals as they vary over time. You may be thinking, “hey, can’t we compute several spectrums by performing FFT on several windowed segments of the signal?” Yes! This is exactly what is done, and it is called the?short-time Fourier transform.?The FFT is computed on overlapping windowed segments of the signal, and we get what is called the?spectrogram.?Wow! That’s a lot to take in. There’s a lot going on here. A good visual is in order.

You can think of a spectrogram as a bunch of FFTs stacked on top of each other. It is a way to visually represent a signal’s loudness, or amplitude, as it varies over time at different frequencies. There are some additional details going on behind the scenes when computing the spectrogram. The y-axis is converted to a log scale, and the color dimension is converted to decibels (you can think of this as the log scale of the amplitude). This is because humans can only perceive a very small and concentrated range of frequencies and amplitudes.

Ok. We are almost there! We have a solid grasp on the “spectrogram” part, but what about “Mel.” Who is he?


The Mel Scale

Studies have shown that humans do not perceive frequencies on a linear scale. We are better at detecting differences in lower frequencies than higher frequencies. For example, we can easily tell the difference between 500 and 1000 Hz, but we will hardly be able to tell a difference between 10,000 and 10,500 Hz, even though the distance between the two pairs are the same.

In 1937, Stevens, Volkmann, and Newmann proposed a unit of pitch such that equal distances in pitch sounded equally distant to the listener. This is called the?mel scale.?We perform a mathematical operation on frequencies to convert them to the mel scale.

The Log Mel Spectrogram

A?mel spectrogram?is a spectrogram where the frequencies are converted to the mel scale. I know, right? Who would’ve thought? What’s amazing is that after going through all those mental gymnastics to try to understand the mel spectrogram, it can be implemented in only a couple lines of code.

In Summary

  1. We took samples of air pressure over time to digitally represent an audio?signal

  2. We mapped the audio signal from the time domain to the frequency domain using the?Fourier transform, and we performed this on overlapping windowed segments of the audio signal.

  3. We converted the y-axis (frequency) to a log scale and the?amplitude?(color dimension) to decibels to form the?spectrogram.

  4. We mapped the y-axis (frequency) onto the?mel scale?to form the?mel spectrogram.


Understanding the Mel Spectrogram的評論 (共 條)

分享到微博請遵守國家法律
靖西县| 岳阳县| 北票市| 西畴县| 临潭县| 罗江县| 金寨县| 湟中县| 肇庆市| 芜湖市| 阜阳市| 湾仔区| 资源县| 大洼县| 雷山县| 泗洪县| 江孜县| 彭泽县| 新营市| 松滋市| 竹溪县| 内江市| 湖北省| 溧阳市| 遵义市| 兴城市| 敖汉旗| 安乡县| 霍山县| 安康市| 青海省| 武城县| 左云县| 顺平县| 务川| 新乐市| 昭苏县| 临高县| 开封市| 安西县| 永年县|