1
$\begingroup$

I am running the following code in python to get the spectrogram of a audio signal of wind:

import librosa import numpy as np # Load the audio as a waveform `y` # Store the sampling rate as `sr` file_path = "wind.wav" y, sr = librosa.load(file_path, sr = None, mono=True, offset = 0.0, duration=None) D = librosa.stft(y) librosa.display.specshow(librosa.amplitude_to_db(D,ref=np.max),y_axis='log', x_axis='time') plt.title('Power spectrogram') plt.colorbar(format='%+2.0f dB') plt.tight_layout() 

I get the following image:

enter image description here

My question: How do I interpret this image? What exactly am I looking at and what are the frequencies in this audio file?

$\endgroup$
2
  • 1
    $\begingroup$ Hi! You've figured out it's called a spectrogram; at least wikipedia has an article on that, so could you please base your question off what you've researched so far? really little sense that we copy down an article that is available on the internet! $\endgroup$ Commented Mar 28, 2021 at 10:46
  • $\begingroup$ Most of your graph is black. Try plotting it with a log frequency axis. A) you get way better frequency resolution where the action is: B) it's much more appropriate for assessing audible features of the noise (as human hearing also uses mostly log frequency scale). $\endgroup$ Commented Mar 28, 2021 at 11:49

1 Answer 1

2
$\begingroup$

The almost steady colored part between 1 s and 35 s, and below about 30 Hz may be the sign of a low-frequency, continuous noise that seems to be common to mild winds. There seems to be occasional gusts of wind around 12 s to 17 s or 22 s to 25 s. However, the needle aspect of the spectrogram coefficients may suggest to modify the window, and the little information on frequencies above 256/512 Hz would suggest to look closer at the low frequencies, possibly with a linear frequency scale to better see details.

$\endgroup$
2
  • 1
    $\begingroup$ Awesome weather report, congrats! :) $\endgroup$ Commented Mar 28, 2021 at 11:14
  • 1
    $\begingroup$ Very mild wind conditions! Stay at home, for fear of aerosols :) $\endgroup$ Commented Mar 28, 2021 at 11:47

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.