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
0
votes
0 answers
How to extract spectrogram features in a text file?
i am new in python and i want to extract the spectrogram of the magnitude in a text file
Here is my code
dataset = np.loadtxt("trainingdataset.txt", delimiter=",", dtype = np.int32)
fake_size = 1415684
time = np.arange(fake_size)/1415684 #…

Hadeer El-Zayat
- 281
- 5
- 20
0
votes
0 answers
spectrogram for one x-axis accelerometer signal
trying to convert accelerometer signal into spectrogram instead of raw data
i try the following code
import matplotlib.pyplot as plt
from scipy import signal
import numpy as np
sample_rate, samples = np.loadtxt("trainingdataset.txt",…

Hadeer El-Zayat
- 281
- 5
- 20
0
votes
1 answer
how to convert the x-axis accelerator signal into spectrogram in python?
my dataset (patient No., time/millisecond, x, y, z, label)
1,15,70,39,-970,0
1,31,70,39,-970,0
1,46,60,49,-960,0
1,62,60,49,-960,0
1,78,50,39,-960,0
1,93,50,39,-960,0
.
.
.
i am trying to to use the spectrogam for x-axis signal in preprocessing…

Hadeer El-Zayat
- 281
- 5
- 20
0
votes
0 answers
Spectrogram of an Image
I have a 2048x2048 image and as part of processing it, I am trying to identify frequencies through spectrogram but I think it works only per row or column of the image and not on a batch of rows. Am I wrong? can someone help with implementing the…

Gal Shai
- 11
- 1
0
votes
2 answers
MATLAB, Convert 4049 rows x 50 columns of spectrograph data into 3D plot
%Sampling Frequency
f=8000;
%Sampling Time
t=5;
%Data imported from microsoft Excel
matrix=Book2S1;
%Size Matrix
s=size(matrix);
h=s(1,1);
w=s(1,2);
%Set Up Rows and…

Albert Garcia
- 19
- 5
0
votes
0 answers
how to use spectrogram with 2D array in python?
need to modify the following code to create a spectrogram
column_names = ['user-id','activity','timestamp', 'x-axis', 'y-axis', 'z-axis']
data = pd.read_csv('filepath',delimiter='\t')
and this is a sample of the data:
33 2 4.91E+13 …

Hadeer El-Zayat
- 281
- 5
- 20
0
votes
0 answers
how to convert an accelerometer signal saved in text file to spectrogram?
this is the code i tried in python 3.6.1 but it gets me an error !!
import numpy as np
data = np.genfromtxt('filename', dtype=None , delimiter=",")
NFFT = 200 # the length of the windowing segments
Fs = 500 # the sampling rate
Pxx, freqs, bins,…

Hadeer El-Zayat
- 281
- 5
- 20
0
votes
1 answer
How can I extract short-time fourier transform (stft) data in python
I'm going to compare stft frequency data with another stft frequency data. I just can use stft method, but I don't know how to extract stft frequency data. Here is my data.
from scipy import signal
import matplotlib.pyplot as plt
import numpy as…

JK Lee
- 11
- 3
0
votes
1 answer
Obtaining Indexes for maximum points in a 2D numpy array
I know this seems to be somewhat of a common question, but none of the answers currently seem to help my situation. I have a 2D numpy array which stores a spectrogram of a song. I want to identify the peaks using numpy's where function (I know…

Clement
- 367
- 2
- 18
0
votes
0 answers
Make a spectrogram plot using three 1D array in python with matplotlib
I have 3 column data in large text file which each column contains 1d array.
first column (x) is time as datetime format, second column (y) is frequency and third column (z) is Power in dB. Here is the example data.
x (datetime) …

Sinta
- 1
0
votes
2 answers
Spectrogram after fft
I want to ask. I have my data after Fourier transformation in .mat file. I need to get a spectrogram of it.
What function I should to use in Matlab to do it?
spectrogram() function doesn't fit, because it uses signals before Fourier…

joe
- 1
0
votes
1 answer
Get a plot like spectrogram in MATLAB
I would like to get a plot of the same type of the one that I get with spectrogram function, I am trying with contour but I do not get the same result. I have written a small function which compares the two plot. The function records audio for one…

Nisba
- 3,210
- 2
- 27
- 46
0
votes
1 answer
R plot spectrogram base on the amplitude data of a wave
In R, if I would like to plot the spectrogram from a wave, it is as following:
>library(sound)
>library(tuneR)
>library(seewave)
>s1<-readWave('sample1.wav')
>spectro(s1,main='s1')
>str(s1)
Formal class 'Wave' [package "tuneR"] with 6 slots
..@…

Heidi Xiao
- 1
- 6
0
votes
1 answer
Audio file spectrogram, is it time vs amplitude or time vs frequency?
When I am trying to create an spectrogram of an audio file, should I plot time vs amplitude or time vs frequency ?

Prakash Raman
- 13,319
- 27
- 82
- 132
0
votes
1 answer
IndexError: too many indices for array when trying to plot a spectrogram of a .wav file
I am trying to plot a spectrogram of a .wav file.
The strange thing about the way the below code behaves is that it works on some .wav files and fails on others. I suspect that this is because some .wav files have a different number of channels…

Sreehari R
- 919
- 4
- 11
- 21