In this line:
|
bin = numpy.floor((nfft+1)*mel2hz(melpoints)/samplerate) |
I think you are assuming that np.floor(t+1) = np.round(t), but that is not true. I think your want:
bin = numpy.round((nfft)*mel2hz(melpoints)/samplerate)
bin = numpy.floor((nfft+0.5)*mel2hz(melpoints)/samplerate)
This is a minor point because they often give the same and it doesn't matter in practice. I just found this point a little confusing in your write-up.
Thanks for the blogpost and this code!
In this line:
python_speech_features/python_speech_features/base.py
Line 169 in 9a2d76c
I think you are assuming that np.floor(t+1) = np.round(t), but that is not true. I think your want:
bin = numpy.round((nfft)*mel2hz(melpoints)/samplerate)
bin = numpy.floor((nfft+0.5)*mel2hz(melpoints)/samplerate)
This is a minor point because they often give the same and it doesn't matter in practice. I just found this point a little confusing in your write-up.
Thanks for the blogpost and this code!