johnmartinsson/bird-species-classification

Compute Spectrogram Correctly

Closed this issue · 2 comments

It seems that the current use of scipy.signal.spectrogram is not sufficient, and that information is lost. Correct this by a manual implementation of spectrogram computations, or by understanding the scipy.signal.spectrogram method completely so that the desired results can be achieved.

References:

The scipy.signal.spectrogram method does seem to be working, and the problem with "lost information" is probably rather in the visualization of the spectrogram. It is probably the case that the colormap has a too steep gradient, and that the "low energy" vocal structures in the recording are not visible against the white background due to them being visualized in a very bright white color. The colormap goes from white to black, and high energy vocals will be visualized as black structures, white low energy vocal structures are very bright.

This has been empirically verified. The "loss of information" is (with high probability) a visualisation problem. The results from Mario Lasseck has been reproduced using the spectrograms calculated using scipy.signal.spectrogram, and it does not seem to be a problem.