2
$\begingroup$

I am trying to do audio classification with a convolutional neural network. There are six classes. With librosa, I have created melspectrograms for the one second long .wav audio files. It returned 640x480 .jpg files. My question is now how to proceed with the input, since I think it is too large as input for the network. If so, what would an adequate resolution be? Something around 60x60? Does it even have to be quadratic?

Options from my perspective:

  1. Re-encode melspectrograms from librosa with smaller resolution
  2. Use cv2 and simply do a cv2.resize() before passing it to the input layer.
  3. Leave the resolution untouched, and introduce more convolutional layers.
  4. ?
$\endgroup$
0
$\begingroup$

A mel-spectrogram for 1 second audio files should have dimensions of about 43x128 (time x frequency bands), when using the default settings in librosa. So if you got a 640x480 JPG file something sounds horribly wrong. Perhaps you are using a plot of the results instead of using the mel-spectrogram data?

$\endgroup$
0
$\begingroup$

Leave the resolution untouched, and introduce more convolutional layers.

This should be the next step. Two primary reasons for it :

  1. This should reduce number of trainable parameters
  2. Model can learn more abstract features
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.