Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
21 views

How to go from wav file to spectrogram back to wav file in python?

Close to this question but different : Wav To Spectrogram, Back To Wav I already posted this on StackOverflow(https://stackoverflow.com/questions/54743968/how-to-go-from-wav-file-to-spectrogram-back-...
0
votes
0answers
63 views

Recover Audio from Spectrogram Image

I have applied transformation(Constant Q Transformation) to my audio time domain signal, this gives me Frequency vs Time representation. Now, the CQT values consists of complex values(84*260), but ...
0
votes
0answers
13 views

Scipy Welch's gives different first element

I've re-implemented Welch's method and want to compare it to scipy.signal.welch. However, the first two and last elements of the resulting array are different. My ...
0
votes
2answers
29 views

What is Causing a Noise Signal in USB Audio Recording?

I am experiencing the following peculiar noise signal when recording from my Behringer Xenyx Control 2 over USB. There is frequency at around 2293 hz as show: And over time, it produces the ...
0
votes
0answers
11 views

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-...
0
votes
0answers
44 views

How can I calculate the Number of bins per octave?

I am trying to calculate the Constant Q Transform for Monophonic audio using Python. The Python has the library to calculate the CQT , the default value of num_bins_per_octave is 12. How would one ...
0
votes
2answers
56 views

How to calculate the PSD from the complex calculated STFT?

I have calculated the STFT with scipy python library: ...
0
votes
0answers
22 views

How to know the time of my window to calculate the STFT with python knowing only the length?

I am trying to implement a work presented in an IEEE paper where they have mentioned that the STFT was performed on the signal measurements to obtain a spectrogram with no overlap window of 3 min : I ...
0
votes
1answer
48 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 ...
0
votes
1answer
30 views

Audacity Spectogram view: how to see exact frequency and intensity under the cursor?

In the Spectogram view, simply clicking anywhere with the selection tool gives a vertical line to the top ruler, and shows at the bottom the exact sample, H:MM:SS, or other time coordinate you'd want. ...
0
votes
1answer
27 views

What's the right scale to represent a frequency spectrum?

To represent a 16 bits temporal spectrum, it's "easy" : my scale is going from -32000 to +32000. But What's the scale for a frequency spectrum ? I made that try : I calculated a pure single frequency ...
0
votes
0answers
56 views

Mirrored Spectrogram Mp3

First of all sorry if this is a stupid question, but I am an absolute beginner in this field and have been trying for days now. I'm working on a java program that uses fft to analyze audio files. To ...
0
votes
0answers
9 views

time-frequency masking with shared properties between vector masks

I am working on a source separation problem and I have a logical mask that when applied to the STFT matrix, gives me expected results. The problem here, is that the mask is based on a spectral feature,...
-1
votes
1answer
17 views

When does a color channel such as RGB carry more info than a grayscale channel or image?

Typically a gray-scale image gives us more information about an image in terms of a signal processing problem. But when does a color channel carry more info than a gray-scale channel? I understand ...
1
vote
1answer
81 views

Spectrogram of 493 signals at a time [closed]

I have been working with some seismic data and recently submitted a paper to a journal. My seismic data has 493 traces: each trace are 8300 seconds long with sampling frequency of 2000 Hz. One of ...
0
votes
1answer
71 views

Spectrogram Interpretation

I collected vibration data (amplitude and time) on a component that was attached to an engine. Using MATLAB I plotted a spectrogram to see what frequencies it vibrated at. The code: ...
0
votes
1answer
66 views

how to create a harmonic mask from fundamental frequency?

Using an algorithm that gives the fundamental frequency across time, example https://www.mathworks.com/help/audio/ref/pitch.html (or some other one?) how would I then use that, to create a harmonic ...
0
votes
2answers
141 views

Different ways of decomposing signals into sinusoids

For purposes of generating a spectrogram, the signal can be divided into overlapping chunks, each chunk multiplied by a window function and transformed to frequency domain using Discrete Fourier ...
2
votes
2answers
72 views

Recommended resources for noise reduction

I know the question What Resources Are Recommended for an Introduction to Signal Processing (DSP)? and I have already read some general DSP books, such as Rick Lyons's "Understanding DSP," and also ...
1
vote
1answer
153 views

Spectrogram with square or non-square magnitude of STFT: power vs. magnitude

As seen in this question and answer, to do a spectrogram, it's common to plot either: the square magnitude $|\text{STFT}(\text{frame}, \text{bin})|^2$ ("power spectrum") the magnitude $|\text{STFT}(\...
1
vote
1answer
176 views

Calculating SNR from Frequency-time domain

I tried to analyse the time-frequency of specific appliances. As it shows in the following frequency-time graph I have High frequency noise from different appliances here. 4096 is the number of ...
0
votes
2answers
54 views

Window length in matplotlib's specgram

In the paper about speaker verification I can read that Two quantities have to be set: the length of the window and the shift between two consecutive windows. For the length of the window, two ...
0
votes
1answer
40 views

Phase of a signal with multi delayed windowed (rectangular window) signal with different amplitudes

I have a signal $x(t)$ which is composed of multi delayed linear chirps with different amplitudes and phases but they share the same $w$ and $\alpha$, the signal can be expressed as follows: $$\...
0
votes
2answers
1k views

Spectrogram from scipy.signal with Python

To test the python spectrogram (from scipy.signal) , I've created a signal with 2 harmonics: 2 Hz and 8 Hz. Then I've added 50Hz noise and a trend (https://i.imgur.com/t1SnQck.png). I wanted to ...
0
votes
0answers
43 views

Log difference measure

Referring to this research paper: Drum Source Separation using Percussive Feature Detection and Spectral Modulation. In section III Temporal Estimation, equation 2 is the log difference of the ...
0
votes
1answer
185 views

How do I apply a binary mask and STFT to produce an audio file?

So here's the idea: you can generate a spectrogram from an audio file using shorttime Fourier transform (stft). Then some people have generated something called a "binary mask" to generate different ...
0
votes
0answers
22 views

Is there any relationship between the frequency band and row number of spectrogram [duplicate]

Can we derive some equation or relationship between the frequency band of the spectrogram and the row number of the spectrogram matrix. For example, if we have a spectrogram ...
0
votes
0answers
41 views

Teager-Kaiser Energy Operator based Spectrogram

I plotted a normal spectrogram for 3 recordings (left), and their TEO (or TKEO) based spectrograms (right). I wanted to understand/read the differences between the left and right pictures. I do ...
0
votes
0answers
72 views

Spectrum of received signal from radar fm-cw

I obtained actual data from a researcher, consisting of a matrix composed of several received signals from an up-ramp fm-cw radar. Wouldn't be reasonable to plot the spectrogram of a ramp up and ...
0
votes
1answer
94 views

What unit is the z axis of a power spectrogram of audio?

the question might seem dumb but since I tried it out and got values well above 2000 (watts?) it got me thinking... Check this out: ...
0
votes
1answer
125 views

1D signal to 2D spectrogram

I struggling at transforming a 1D breathing signal into 2D spectrograms, power spectral density as a function of time and frequency. Does anyone have an idea about that?
0
votes
1answer
66 views

nearest neighbor implementation matlab

I am trying to implement this research paper: I understand everything in the paper except the part about the nearest neighbors calculation (section 3). The only MATLAB function I can think of that ...
0
votes
0answers
189 views

How to manipulate output of Matlab's 'spectrogram' function for additional spectral analyses

all, I have an audio recording that contains several frequency-modulated elements (think animal calls like birds/bats). I have read this file into Matlab using 'audioread' and plotted the oscillogram ...
1
vote
2answers
63 views

Is there such thing as harmony independent timbre characteristic of a sound?

I was wondering if any of you know about any technique to extract a harmony (e.g. harmony in a shape of a chromagram) independent timbre characteristic of a sound frame. What I'm after is a version ...
1
vote
1answer
103 views

CMV: COLA constraint is not necessary

In the literature on the short-time Fourier transform (STFT) it is often stated or implied that the constant overlap-add (COLA) constraint must be satisfied in order for the STFT to be invertible. ...
0
votes
0answers
48 views

What is the difference between spectrogram and spectral envelope, if any?

I am working on different vocoders Griffin-Lim and WORLD. They use spectrogram and spectral envelopes respectively by definition. I wonder the difference between these two representations.
0
votes
2answers
129 views

How to determine the frequency of each row in a MATLAB spectrogram

I recently learned how to manually compute a spectrogram of an audio signal, which is essentially a matrix. Each column corresponds to a time frame (e.g. 10 ms or something) but I'm asking which row ...
0
votes
1answer
80 views

Add noise/signal to mel log spectrogram

I have a predicted mel log spectrogram $S$ and I want to add a noise signal $\eta$ to it. S = log(mel-filterbank(abs/real part of(stft(signal))) The naive way ...
1
vote
1answer
187 views

Apply windowing before FFT or after?

I am computing a spectrogram and I've found a code example online which goes like this: ...
0
votes
1answer
247 views

chirp signal - Frequency spectrum characteristics

I am confused with my own intuition of the frequency response of a chirp signal. In this case, the chirp signal is a frequency modulated signal with initial frequency starting at 100 Hz and ending at ...
0
votes
2answers
272 views

Quantify the difference between two audio spectrograms

I have two speech signals of the same length. They contain the exact same speech content but are recorded from two different microphones. I want to compare the differences between them. 1) Assuming ...
0
votes
1answer
54 views

is there a way to apply a median filter diagonally?

For example, some studies show how to smooth a spectrogram with a 2D median filter vertically and horizontally (along time or frequency). My question is how would I apply 2D median filter along the ...
2
votes
0answers
136 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}^{\...
0
votes
0answers
131 views

Spectrogram parameters for Audio Fingerprinting

I'm using the specgram() function in matplotlib library to get Spectrogram of songs for Audio Fingerprinting (for musics) and making unique hashes for each song (something like shazam) and im sure im ...
2
votes
1answer
107 views

Distinguish harmonic sounds from non-harmonic

I am trying to distinguish harmonic sounds in the range from $100\rm \ Hz$ to $1000\rm \ Hz$ in my audio recording. I attach the spectrogram ($y$-axis is freqeuncy and $x$-axis is time) of a typical ...
-1
votes
2answers
385 views

STFT computation

I'm trying to compute the STFT by my self. Thus, I wrote the following code: ...
4
votes
1answer
501 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 ...
1
vote
1answer
79 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 ...
0
votes
2answers
97 views

What's a good physical description of the following matlab code?

I've inherited some matlab code and I can't really understand what the resultant signal really means. The input is audio and the code first performs an STFT/spectrogram (sliding window FFT of size ...
1
vote
1answer
2k views

scipy.signal.spectrogram

I want to do time-frequency analysis of a signal. So i decided to use spectrogram function from scipy. This function returns, three parameters f,t,Sxx. I am using below arguements: x : my signal fs : ...