Questions tagged [spectrogram]

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.

502 questions
5
votes
4 answers

Compare two spectogram to find the offset where they match algorithm

I record a daily 2 minutes radio broadcast from Internet. There's always the same starting and ending jingle. Since the radio broadcast exact time may vary from more or less 6 minutes I have to record around 15 minutes of radio. I wish to identify…
5
votes
2 answers

Scipy Spectrogram vs. multiple Numpy FFT's

I'm attempting to optimize some code I was given wherein the FFT is taken of a sliding window over a time series (given as a list) and each result is accumulated into a list. The original code is as follows: def calc_old(raw_data): FFT_old =…
ESilk
  • 282
  • 3
  • 14
5
votes
3 answers

plotting spectrogram in audio analysis

I am working on speech recognition using neural network. To do so I need to get the spectrograms of those training audio files (.wav) . How to get those spectrograms in python ?
kks
  • 196
  • 1
  • 3
  • 9
5
votes
2 answers

Save an image (only content, without axes or anything else) to a file using Matloptlib

I'd like to obtain a spectrogram out of a wav file and then save it to a png, but I need just the content of the image (not axes or anything else). I came across these questions Matplotlib plots: removing axis, legends and white spaces scipy:…
Colonder
  • 1,556
  • 3
  • 20
  • 40
5
votes
3 answers

Optimizing the Architecture of a CNN Using Keras in Python3

I am trying to increase my validation accuracy of my CNN from 76% (currently) to over 90%. I am going to show all of the information about my CNN's performance and configuration below. In essence, I want my CNN to distinguish between two classes of…
Sreehari R
  • 919
  • 4
  • 11
  • 21
5
votes
1 answer

python, matplotlib: specgram data array values does not match specgram plot

I am using matplotlib.pyplot.specgram and matplotlib.pyplot.pcolormesh to make spectrogram plots of a seismic signal. Background information -The reason for using pcolormesh is that I need to do arithmitic on the spectragram data array and then…
Nukolas
  • 465
  • 1
  • 7
  • 17
5
votes
1 answer

Different spectrogram between MATLAB and Python

I have a program in MATLAB which I want to port to Python. The problem is that in it I use the built-in spectrogram function and, although the matplotlib specgram function seems identical, I'm getting different results when I run both. These is the…
5
votes
3 answers

Compare two spectrograms in iOS

I am drawing spectrograms using the sample code aurio touch provided by apple. Now I want to compare the two spectrograms in iOS to see if they are same. Is it possible to compare the two spectrograms using the Accelerate framework? If it is…
5
votes
2 answers

Can I adjust spectogram frequency axes?

The MATLAB documentation examples for the spectrogram function gives examples that have the frequency axis set to [0 500]. Can I change this to something like [0 100]? Obviously running the axis command will do this for me, but that adjusts the end…
Dang Khoa
  • 5,693
  • 8
  • 51
  • 80
5
votes
2 answers

gnuplot pm3d gets white lines

I draw a spectrogram with gnuplot version 4.6. I ensured it is the newest version here: http://www.gnuplot.info/download.html Gnuplot is installed from Debian repository. The plot area and the scale on the right includes strange white lines. They…
nuoritoveri
  • 2,494
  • 1
  • 24
  • 28
4
votes
1 answer

How to log scale a 2D Matrix / Image

I have a 2D numpy array of a audio spectrogram and I want to save it as an image. I'm using librosa library to get the spectrum. And I can also plot it using librosa.display.specshow() function. There are number of different scaling types as you can…
4
votes
2 answers

How can I reverse a scipy.signal.spectrogram to audio with Python?

I have: import librosa from scipy import signal import scipy.io.wavfile as sf samples, sample_rate = sf.read(args.file) nperseg = int(sample_rate * 0.001 * 20) frequencies, times, spectrogram = signal.spectrogram(samples, …
Shamoon
  • 41,293
  • 91
  • 306
  • 570
4
votes
1 answer

Measuring audio "loudness": RMS vs. LUFS

I am trying to measure the "loudness" of various clips (ranging from ~2-40 seconds) of TV content. I'm interested in the relative loudness of the content - what scenes have people shouting vs whispering, loud music vs. quiet scenes, etc. I think…
ginobimura
  • 115
  • 1
  • 5
4
votes
1 answer

Is there a way to invert a spectrogram back to signal

In my algorithm I created a spectogram and did manipulation on the data: import scipy.signal as signal data = spio.loadmat(mat_file, squeeze_me=True)['records'][:, i] data = data- np.mean(data) data = data/ np.max(np.abs(data)) freq, time, Sxx =…
tamarlev
  • 71
  • 2
  • 6
4
votes
1 answer

Spectrogram in matlab - time axis format

I have a tone burst signal from 0.20 ms to 0.40 ms. From 0 to 0.20ms and from 0.40ms to 3.27ms it is zero. I did fft which shows frequency content around 25 kHz. The number of fft points is 32768 which is also the length of the time-domain signal. I…
1 2
3
33 34