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
4
votes
1 answer
How to use a context window to segment a whole log Mel-spectrogram (ensuring the same number of segments for all the audios)?
I have several audios with different duration. So I don't know how to ensure the same number N of segments of the audio. I'm trying to implement an existing paper, so it's said that first a Log Mel-Spectrogram is performed in the whole audio with 64…

user2687945
- 43
- 1
- 4
4
votes
1 answer
Using Librosa to plot a mel-spectrogram
I am having trouble creating a mel-spectrogram in librosa using a custom file path to my sound.
I am following this documentation:
https://librosa.github.io/librosa/generated/librosa.feature.melspectrogram.html
And I have looked at this stack…

Sreehari R
- 919
- 4
- 11
- 21
4
votes
1 answer
Oscillation and frequency spectrum through a Fourier transform
I'm trying to find the oscillation and spectrum frequency of the waveform generated by a vector of data representing the motion of a pixel in an image.
The data is stored in a .txt file, as follows:
75.000000
60.000000
52.000000
61.000000…

Jorge Cruz
- 41
- 3
4
votes
1 answer
signal.spectrogram find maximum frequency for given segment
After calling scipy.signal.spectrogram is it possible to determine the strengths of different frequencies for a given segment?
i.e. after executing the following:
fs, data = wavfile.read(waveFile)
sampleFreqs, segmentTimes, sxx=…

D Rayner
- 55
- 1
- 7
4
votes
2 answers
Drawing a matrix with a gradient of colors "Spectrogram"
After using STFT(Short-time Fourier transform) the output is a matrix that represents a 3d plot as though (A[X, Y] = M) A is the output matrix, X is the time , Y is the frequency, and the third dimension M is the amplitude illustrated by the…

Mohamed Hosnie
- 93
- 2
- 11
4
votes
2 answers
How to change pyplot.specgram x and y axis scaling?
I have never worked with audio signals before and little do I know about signal processing. Nevertheless, I need to represent and audio signal using pyplot.specgram function from matplotlib library. Here is how I do it.
import matplotlib.pyplot as…

minerals
- 6,090
- 17
- 62
- 107
4
votes
1 answer
How to convert a seewave spectrogram into a wav file
I would like to manipulate a seewave audio spectrogram and then convert it back to a .wav file.
A quick example
library(tuneR)
library(seewave)
data(tico)
#generate spectrogram with phase…

cryo111
- 4,444
- 1
- 15
- 37
4
votes
1 answer
Converting a WAV file to a spectrogram
Hi im very new to this thing so please bear with me. I am trying to convert a WAV file to a spectrogram but arent sure how to begin with. I read on something that says to read the PCM data(which i think is my WAV file) and store it in an array in…

Derrick Peh
- 309
- 2
- 8
- 20
3
votes
0 answers
How do I scale frequency axis of librosa spectrogram without using display.specshow?
Context
I'm working on an audio classification problem and I want to recreate the spectrogram I get from librosa's built in plotting in grayscale.
The reason for doing this is to create images to pass to a neural network. Doing it with Matplotib is…

cbhower
- 69
- 5
3
votes
1 answer
Why spectrogram from librosa library have different time duration of the actual audio track?
I'm trying to plot the wave plot and spectrogram from a 16000Hz 16-bit .wav speech audio. I have successfully obtained the below plots:
However, the time value on the spectrogram is not correct. I'm certain that my sampling rate is consistent…

John
- 59
- 1
- 2
- 13
3
votes
0 answers
Python Audio Analysis, Spectrogram: 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 using a spectrogram.
I am using MIR-QBSH dataset…

Dionisius Pratama
- 464
- 3
- 13
3
votes
1 answer
While using holoviews in google Colab I get this error - cannot import name 'future_add_done_callback'
I am trying to plot a spectrogram from my Numpy array. I tried to look up stack overflow for a solution but could only find that the version of tornado might be needed to be downgraded but even that did not help. Can you please help me with my…

Tushar Poddar
- 55
- 6
3
votes
2 answers
What is the difference between a WAV file and an M4A file?
I'm looking to convert some audio files into spectrograms. I'm wondering what the difference is between an m4a and wav file. If I have two of the same audio recording, one saved as wav and the other as m4a, will there be a difference in the…

DIB98
- 53
- 1
- 6
3
votes
1 answer
Reproduce sox spectrogram in scipy
For example I have a wav file with speech.
I can create nice spectrogram visualization with sox:
wget https://google.github.io/tacotron/publications/tacotron2/demos/romance_gt.wav
sox romance_gt.wav -n spectrogram -o spectrogram.png
How can I…

mrgloom
- 20,061
- 36
- 171
- 301
3
votes
1 answer
Getting spectrogram from recorded audio , ERROR: "ParameterError: Audio buffer is not finite everywhere"
I'm trying to record a sound using 'pyaudio' and get a spectrogram for the audio, but I get the above error: " Audio buffer is not finite everywhere".
It might be a possible duplicate, but I didn't find something which solves the eroror. Here is my…

Ravi
- 167
- 2
- 12