Questions tagged [spectrogram]

A spectrogram is a time-varying spectral representation (forming an image) that shows how the spectral density of a signal varies with time.

Filter by
Sorted by
Tagged with
23 votes
4 answers
30k views

Reconstruction of audio signal from Spectrogram

I have a set of songs for which I extracted the magnitude spectrogram using a Hamming Window with 50% overlap. After extracting the spectrogram, I did some dimensionality reduction using Principal ...
user avatar
  • 431
22 votes
2 answers
24k views

Improving spectrogram resolution in Python?

I'm using the specgram() function in matplotlib to generate spectrograms of speech wave files in Python, but the output is ...
user avatar
10 votes
3 answers
5k views

Converting mel spectrogram to spectrogram

I have a set of songs for which I extracted the STFT (Short-Time Fourier Transform) and used the magnitude spectrum $|S|$ to calculate the mel spectrogram by using a mel filterbank matrix $M$, so $X=\...
user avatar
  • 431
10 votes
1 answer
5k views

Creating a spectrogram

I've been trying to work out the logic for this task, and plan to use the KissFFT source package to perform the fast fourier transform. Please let me know if this looks about right: Allocate an FFT ...
user avatar
  • 101
10 votes
1 answer
3k views

What is the maximal frequency resolution for Matlab's STFT implementation spectrogram()?

Matlab's spectrogram() function calculates the STFT of a signal. It describes its NFFT argument as follows: ...
user avatar
  • 1,938
9 votes
3 answers
7k views

Reconstruction of Audio Signal from its Absolute Spectrogram

I have the absolute Spectrogram of an audio signals. I lost the phase data of the Spectogram because of various processing applied on the original spectrogram of the signal. I'm trying to reconstruct ...
user avatar
  • 40.7k
9 votes
2 answers
9k views

interpret wavelet scalogram

My knowledge of wavelets is less than epsilon. Bear with me. If I have a signal of two well separated sinusoids (15 and 48 Hz) plus some random noise, I can clearly make out the two in a spectrogram (...
user avatar
7 votes
5 answers
3k views

Vertical lines noise in spectrogram

I have started looking into DSP and made an implementation of short-time fourier transform, using kissFFT to perform the FFT. I then render a spectrogram. An example image that I have generated can ...
user avatar
7 votes
2 answers
376 views

Fourier Like Spectral Analysis with Uneven Intervals and Redesigned DFT Matrix

I intended to use a discrete Fourier transform (DFT) on a time series sampled at uneven intervals. What I did was to calculate a DFT matrix where the elements are the values at the uneven locations ...
user avatar
7 votes
1 answer
100 views

Can I "reverse" spectral leakage by solving a linear system?

When I compute a spectrogram of (say) a piece of music, there is a lot of frequency "smearing." Often we can reasonably expect that the "true" generating process is much sparser in ...
user avatar
5 votes
3 answers
45k views

FFT to spectrum in decibel

Here is a 10 seconds-long 440hz sine wave normalized at $0\textrm{ dBFS}$. When computing the STFT (with the code below) of this audio file, I noticed that ...
user avatar
  • 1,217
5 votes
4 answers
48k views

How do I plot the spectrogram of a wav file?

I am dabbing a little bit into signal processing on MATLAB. And I have the following question that I would like to know the answer to. What has to be done : Plot the Spectrogram of an audio file. ...
user avatar
  • 51
5 votes
2 answers
1k views

Using MATLAB's Spectrogram Function for Analysis

In the documentation - sepctrogram(). Question 1)s = spectrogram(signal) and ...
user avatar
  • 291
5 votes
1 answer
1k views

Spectrogram Analysis

I have four .wav files and each contain bird chirps. Given an input .wav file, I need to find out which bird it is. I have some basic understanding of signal processing. I have used spectrogram to ...
user avatar
5 votes
1 answer
998 views

Why is the DFT used for spectrograms rather than the DCT?

Related to Could a DCT be used for an audio magnitude spectrum rather than DFT?, but more on the (audio) spectrogram side of things I've been reading about the DCT (such as from here) and it ...
user avatar
  • 151
4 votes
3 answers
3k views

How to interpret spectrogram correctly?

I have a pressure transducer signal from a reacting mixture available here, which has a sampling frequency of 50kHZ. I have also obtained the spectrogram of the signal with NFFT=256, noverlap=4 as ...
user avatar
  • 143
4 votes
3 answers
9k views

Understanding overlapping in STFT

I understand the concept of the STFT. In order to avoid spectral leakage, you use a Hann window that overlaps by 50%. However, the problem that I have, is that the example code online does not account ...
user avatar
4 votes
5 answers
14k views

generating spectrograms in python with less noise

I'm trying to do something similar to Shazam (paper here) in Python. Basically the idea is to use FFT with sliding window to transform both WAV files and recorded audio to the same spectral ...
user avatar
4 votes
3 answers
4k views

Why do we get ripples in the frequency spectrum of a chirp, and how do I remove it?

The ripples in the amplitude spectrum of a linear spectrum is undesirable. I desire to obtain a flat spectrum response. Hence, how can I remove these ripples? Also, which factors (like time bandwidth ...
user avatar
  • 111
4 votes
2 answers
4k views

Finding pitch from a wideband spectrogram

We can use the narrowband spectrogram for finding the pitch of an utterance. But is it possible to find the pitch using the wideband spectrogram? If so, how would that be done?
user avatar
  • 568
4 votes
1 answer
3k views

Spectrograms for neural nets

General Question Given an audio file, say a 16-bit wav, what are some standard methods to preprocess a spectrogram of this wav so that it may be fed into a neural net? Context In Lee et al's 2009 ...
user avatar
4 votes
1 answer
2k views

Is it possible to recover a waveform from spectrograms of magnitude *and* phase?

It is my rough understanding that a typical spectrogram discards phase information by squaring only the real-valued part (magnitude) of the STFT (I know it's not quite this simple, but feel free to ...
user avatar
  • 143
4 votes
1 answer
107 views

Audio Processing - How to create a spectral pitch display?

I want to create an application that analyzes human voice pitch, but spectrograms are very noisy. However, in Adobe Audition, there is a feature called the spectral pitch display, and it successfully ...
user avatar
4 votes
4 answers
2k views

What is really the Mel-filterbank?

After applying STFT to a signal, you typically need to convert the frequencies to the Mel scale. Typically the frequency values range from $0$ to $N/2$, where $N$ is the width of each sliding window. ...
user avatar
4 votes
1 answer
1k views

Convolving With half-Hanning

The goal is to get a 200ms decaying delay of an audio signal while preserving the sharpness of attacks to mimick human perception of sound. The paper I'm following convolves a 200ms half-Hanning ...
user avatar
  • 173
4 votes
2 answers
2k views

What is the best way to represent audio visually? (x-post from UX)

Original Question: https://ux.stackexchange.com/q/23040/16006 I've only taken some basic signal analysis courses, so I might be missing some things. Purely theoretical question: What methods exist ...
user avatar
  • 141
4 votes
1 answer
100 views

log(conv) vs conv(log)

Suppose an arbitrary, strictly positive $x[n]$, transformed as $$ x_l[n] = \log(1 + C x[n]) \tag{0} $$ where $C$ is freely chosen. Given the following, where $h[n]$ is a Gaussian lowpass filter (or ...
user avatar
3 votes
3 answers
630 views

strange phenomenon in spectrogram of Windowed Fourier Transform [edited] [closed]

I am trying to understand how the Windowed Fourier transform works, so I used Matlab to create an artificial signal, and plotted the Windowed Fourier transform using a gaussian window. $x(t) = \left\...
user avatar
3 votes
3 answers
4k views

Python audio analysis: which spectrogram should I use and why?

I am doing my final project at university: pitch estimation from song recording using convolutional neural network (CNN). I want to retrieve pitches existed in a song recording. For CNN input, I am ...
user avatar
3 votes
2 answers
2k views

What is the most precise frequency analysis spectrography algorythm?

Everyone uses Fast Fourier Transform, which is fast at the detriment of precision. The input audio has sample accuracy and the FFT has 1/64 sample accuracy. What algorithms can output high resolution ...
user avatar
3 votes
2 answers
2k views

Self studying, getting a quality spectrogram

So I've been self studying signal processing, and been trying to use Python to get quality spectrograms, quality spectrogram like the one that would be produced with audacity etc. The steps I have ...
user avatar
  • 133
3 votes
2 answers
242 views

Meaning of concentric circles on the spectrogram

I've got this unusual spectrogram and I am really curious what these circles could mean. Has anyone ever seen anything like this? What could be the source of the signal?
user avatar
  • 163
3 votes
2 answers
136 views

What is the theoretic difference in the ways to compute the spectrogram?

I have noticed that the spectrogram for a audio signal is often calculated in different ways when the result from the DFT is transformed into real numbers; some tend to compute $|k|$ or $|k|^2$ while ...
user avatar
  • 323
3 votes
2 answers
185 views

Why does Matlab spectrogram look stripy when windowed input is zero-padded?

I am working on a little project, and stumpled upon something I cannot understand yet. I am learning cognitive science, and don't have DSP knowledge background, only learning from what I find on the ...
user avatar
3 votes
3 answers
452 views

scipy.signal.spectrogram() - how to handle gaps in the timeseries data

Looking at the magnitude of variable stars - the dataset is from here: https://dogwood.physics.mcmaster.ca/Cepheid/URL/MW/BD-10d4669.html The magnitude plot: ...
user avatar
3 votes
5 answers
2k views

How to deal with audio with different length in Audio Classification

Currently, I am trying to work with the Dataset UrbanSound8K to try some Audio classification. And I got stuck in the preprocessing step already. Since the audios are of different lengths, like 4 ...
user avatar
  • 33
3 votes
1 answer
7k views

Spectrogram, time vs frequency localization, and length of signal

So I'm having some trouble conceptually and am hoping somebody can clear something up for me. This is long and I apologize for that but I want to provide as much information as possible so that the ...
user avatar
3 votes
1 answer
124 views

Extracting original signal from overlapping area

Considering this image, where I have a spectral decomposition of a light bulb. Due to the non point shaped light source, the spectral decomposition using a diffraction grating in front of my camera ...
user avatar
  • 152
3 votes
1 answer
128 views

Compressing A Range Of Decibel Values to One "Representative" Value

Don't have any formal dsp experience - sophomore in college. Working on constructing a 25 band bark spectrogram for psychoacoustic analysis of audio FFT data. To do this, I'm grouping all FFT ...
user avatar
  • 173
3 votes
0 answers
197 views

Reconstruct signal from its Spectrogram only

The spectrogram of a signal throws away the phase information, but it is said to be possible to reconstruct the signal only from the spectrogram [1] via $$s(t) = \frac{1}{2\pi s^*(0)}\int_{-\infty}^{\...
user avatar
  • 139
3 votes
0 answers
554 views

What is the autocorrelation equivalent of the spectrogram called?

I'm very knowledgeable about the differences between the Fourier transform, and the autocorrelation; mainly that one converts the time domain to the frequency domain, and the other finds periodicities ...
user avatar
3 votes
0 answers
294 views

Points of interest in a spectrogram

We have several audio tracks, all of which are different versions of the same track under one type of distortion: the speed of the track is increased by a constant factor K (hence frequences are ...
user avatar
  • 131
3 votes
3 answers
154 views

Using spectogram to speed up a signal - Time Scaling/Phase Vocoder

Background About half a year ago, while learning about spectograms as part of an Image Processing course I took, I was told you can speed up audio using spectograms as follows: Calculate the ...
user avatar
3 votes
1 answer
218 views

How can you 'perfectly' reconstruct phase for transients in a modified audio absolute spectrogram?

I am currently working on the absolute spectrogram of an input audio signal. I am using non-negative matrix factorization to separate out the rhythmic components (bass drum, snare drum and hi-hat) of ...
user avatar
2 votes
1 answer
646 views

Spectrogram of a single tone complex signal has two dark lines?

I am trying to plot the spectrogram of a complex signal I generated. I have written code to generate this signal and plot the spectrogram. It works. However I see that there are two dark lines present ...
user avatar
  • 173
2 votes
2 answers
2k views

Finding the frequencies given in a wav file

I have a wav file containing a series of chords, each containing 3 or 4 notes, played concurrently. I need to find the frequencies of each note in each chord, and I can use matlab to do any ...
user avatar
  • 1,017
2 votes
2 answers
514 views

Does an equivalent transformation of a signal to a spectrogram image exist in which the phase information is part of the resulting image?

I'm working on a research project where we would like to apply convolutional neural networks to an image representation of a signal. However, it seems that if I would use a spectrogram, I would end up ...
user avatar
2 votes
1 answer
593 views

unexplainable aliases in spectrogram

My scope has 200 MHz bandwidth and can sample at 4GS/s I'm sampling a 138 MHz RF signal at 500 M Sa/s storing 14 M points. When I plot the spectogram in matlab I get the following spectrogram(Data,...
user avatar
  • 123
2 votes
2 answers
181 views

Estimating noise level without 'quiet' segment

I have a signal which consists of an onset and a release period. The onset, sounding like a thud, excites frequencies across the entire frequency range (0-22 kHz). It lasts for about 0.1 s. The ...
user avatar
  • 121
2 votes
1 answer
71 views

Performing STFT after Butterworth Filter Seems Lower in Resolution

I have a signal recorded at 2MHz sampling rate. Before any decimation might be required, I first looked for peaks in my periodic recorded signal using STFT/spectrogram. From here, I can clearly see ...
user avatar
  • 77

1
2 3 4 5 6