kitzeslab / bioacoustics-model-zoo

Pre-trained models for bioacoustic classification tasks
30 stars 7 forks source link

Exception in Perch due to audio window length #8

Closed jhuus closed 7 months ago

jhuus commented 8 months ago

For a couple of recordings, when running Perch I receive an error message like this, followed by an exception:

opensoundscape/audio.py:340: UserWarning: Audio object is shorter than requested duration: 4.04 sec instead of 5.0 sec

An example (which gave the exact message above) is https://wildtrax-aru.s3.us-west-2.amazonaws.com/b112fbf3-a50f-49d9-8fcf-bbb65a9bcd1a/199884.mp3. Maybe the shorter window should be padded with zeros before feeding it to Perch.

sammlapp commented 7 months ago

Good call, we can add "extend to 5s with zeros" as a default preprocessing operation