title: Why 128 mel bands are used in mel spectrograms?
body: <p>I am using the mel spectrogram function which can be found here:<a href="https://librosa.org/librosa/0.7.2/generated/librosa.feature.melspectrogram.html#librosa.feature.melspectrogram" rel="nofollow noreferrer">Mel Spectrogram Librosa</a></p>
  <p>I use it as follows:</p>
  <pre><code>signal = librosa.feature.melspectrogram(y=waveform, sr=sample_rate, n_fft=512, n_mels=128)
  </code></pre>
  <p>Why is 128 mel bands use? I understand that the mel filterbank is used to simulate the &quot;filterbank&quot; in human ears, that's why it discriminates higher frequencies.</p>
  <p>I am designing and implementing a Speech-to-Text with Deep Learning and when I used n_mels=64, it didn't work at all, it only works with n_mels=128.</p>
  <p>Could it because I am normalizing it before injecting it to the network? I am using the librosa.utils.normalize function and it normalizes the mel spectrogram between -1 and 1.</p>
  <p>I tried to find where to learn or the reasoning, the only paper I found was this one. Here mel bands from 512 to 128 are being used..... <a href="https://arxiv.org/pdf/1706.07156.pdf" rel="nofollow noreferrer">Comparison of Time-Frequency Representations forEnvironmental Sound Classification usingConvolutional Neural Networks</a></p>
  <p>Output examples when n_mels=128
  <a href="https://i.stack.imgur.com/EYAjn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EYAjn.png" alt="enter image description here" /></a></p>
  <p>Output examples when n_mels=64
  <a href="https://i.stack.imgur.com/2yrPR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2yrPR.png" alt="enter image description here" /></a>
  Thanks.</p>