A spectrogram, or sonogram, is a visual representation of the spectrum of frequencies in a sound, at each time. Spectrograms are also called spectral waterfalls, voiceprints, or voicegrams. Spectrograms are used extensively in the development of the fields of music, sonar, radar, and speech processing, seismology, etc.
Questions tagged [spectrogram]
502 questions
2
votes
0 answers
How to extract the frequencies from spectrogram?
I got some code which takes wav songs from one folder and generates the corresponding spectrograms in another folder. However, I would like to extract the frequencies sampled each song when generating the spectogram, to eventually plot a histogram…

Undead
- 125
- 2
- 7
2
votes
0 answers
Compute autocorrelogram (correlogram) from a wave file?
How to compute autocorrelogram (correlogram) from a speech signal (as a wav file) in python? Is there any online code/library function available for that?

Shahan Ali Memon
- 23
- 6
2
votes
1 answer
Voice recording spectrogram
I am creating a voice recording app wherein I have displayed a decibel meter. However, I would like to include a voice spectrogram on the lines of what is found in Dragon Dictate or Google Search applications.
Any suggestions on where I can start…

Anand
- 153
- 1
- 8
2
votes
1 answer
Need explanation how specgram function work in python (matplotlib - MATLAB compatible functions)
I'm working on converting my code from python to objective c.
Inside matplotlib.mlab.specgram function I see 3 important functions before fft :
result = stride_windows(x, NFFT, noverlap, axis=0)
result = detrend(result, detrend_func, axis=0)
…

hoangpx
- 470
- 2
- 16
2
votes
1 answer
How do I read variable length 1D inputs in Tensorflow?
I'm trying to read variable length 1-D inputs into a Tensorflow CNN.
I have previously implemented reading fixed length inputs by first constructing a CSV file (where the first column is the label and the remaining columns are the input values -…

kashkar
- 663
- 1
- 8
- 22
2
votes
1 answer
Spectrogram of a wave file
I am trying to obtain spectrogram of a wav file in python. But it gives the error:
'module' object has no attribute 'spectrogram'.
Here is the code :
import scipy.io.wavfile
from scipy.io.wavfile import read
from scipy import signal
sr_value,…

ali
- 119
- 1
- 3
- 15
2
votes
0 answers
Inconsistent answers between the 'density' and 'spectrum' scaling option of scipy.signal.welch
I cannot get consistent answers when using the scipy.signal.welch function between the power spectrum density (PSD) 'density' and power spectrum 'spectrum' scaling options in Python 3.
I know that the units for density are V^2/Hz and and for…

SpartanChew
- 21
- 2
2
votes
1 answer
Removing padding from Matplotlib spectrogram
I'm trying to remove the white spaces padding matplotlib's generated spectrogram. I've tried setting a limit to the axis and setting tight to the axis but these don't work.
Here's a screenshot:
Thanks

congIA
- 25
- 2
2
votes
1 answer
scipy.signal.spectrogram output not as expected
I am using scipy.signal.spectrogram() for analysing a dataset containing values for a current. My input to the function is as follows:
f, t, Sxx = signal.spectrogram(y, fs)
(for plotting in subplot 3 (from the top) I use plt.pcolormesh(t, f,…

roggjah
- 21
- 1
- 5
2
votes
3 answers
Can Python + Qt combination produce a real time spectral analysis tool?
I want to develop a tool that does the following things.
take in a live voice recording
produce a real time spectrogram
show the time-domain signal
output few values extracted from the spectral analysis
All of these have to be kept updated in a…

gopalkoduri
- 442
- 1
- 4
- 15
2
votes
1 answer
How to generate the spectrogram of a wav file in Matlab with frequency on the x-axis
As part of a research project, I would like to analyze a sound file by generating it's spectrogram.
I have been able to successfully generate the spectrogram of the wave file in matlab with frequency on the y-axis and the time on the x-axis. I would…

Aditya
- 1,172
- 11
- 32
2
votes
3 answers
Create 2D Spectrogram in Matlab
I am in need of plotting a 2D spectrogram of a signal in Matlab. I need it for a printed assignment, hence the 3D image makes no sense. However, when the signal is plotted using Spectrogram it automatically produces a 3D plot of the signal.
My…

Mikkel Krogh Simonsen
- 45
- 1
- 8
2
votes
1 answer
Plotting with matplotlib specgram?
I'm trying to plot a signal and the spectrogram of the signal with matplotlib, but... i get the spectrogram only for the first value (samples) of my signal (like 60 of the 30000...).
It's a very long file, that's why I would like to plot only the…

Dadep
- 2,796
- 5
- 27
- 40
2
votes
3 answers
Matlab's specgram outdate vs spectrogram replace
In Matlabs recent versions, the specgram function is being replaced by spectrogram, and the documentation states:
Note. To obtain the same results for the removed specgram function, specify a 'Hann' window of length 256.
Unfortunately, that…

dMaggot
- 81
- 1
- 6
2
votes
1 answer
Time frequency spectrogram in Python
I have some 64 channel EEG data sampled at 256Hz and I'm trying to conduct a time frequency analysis for each channel and plot a spectrogram.
The data is stored in a NumPy 3d array, where one of the dimensions has length 256, each element containing…

Simon
- 9,762
- 15
- 62
- 119