Over the past few weeks, I have been working on a problem of segmenting an audio file containing some bat samples. I have now successfully come up with a moderate algorithm to do this.
I am trying to calculate the herts, or, the Htz of each of blocks that I have deemed to contain interest.
Currently, for the signal I am calculating the frequency using the following:
$$ freq = i * Fs / NFFT $$
i is the bin_index of the currently block.
This produces a vector containing 128 values which holds the frequencies. This, looks correct when I am plotting the spectrogram.
For each of the blocks that are of significance, I calculate the following:
1) Take the max magnitude of each of the blocks, capture the index
2) Match the index (calculated above) against the frequency vector
This, for one of the blocks produces the following:
hertz = 3375
To which I convert to Htz using the following:
Htz = hertz / 1000 = 3.375
Now, from my estimation, 33.3Htz does seem reasonable since this is in audible hearing, however, why am I getting such a small number, compared to what I should be getting?