interactiveaudiolab / penn

Pitch Estimating Neural Networks (PENN)
MIT License
236 stars 22 forks source link

Need support for 0-centered frames and support to sample_rate 22.05kHz #8

Closed im4 closed 1 year ago

im4 commented 1 year ago

It seems both pad=True and pad=False are not zero centered. When Pad=True, the first frame starts from -(winsz-hopsz)//2. instead of -winsz//2.

When using this model for audio at sample rate of 22.05kHz at a hop size of 256, the rounding in the time_to_samples causes the audio hop size to be inaccurate. causing the number of frames to be bigger/smaller than what the hopsize field indicates.

maxrmorrison commented 1 year ago

All fixed in version 0.0.9. Use center='zero' for your desired padding. See also #9