vocalpy / crowsetta

A tool to work with any format for annotating animal sounds
https://crowsetta.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
52 stars 3 forks source link

Remove exceptions from birdsongrec.py #254

Closed NickleDave closed 1 year ago

NickleDave commented 1 year ago

This removes NotADirectory and FileNotFound errors raised by birdsongrec2annot when wavpath doesn't exist or it can't find the wav files in the specified wavpath, respectively.

My intent was to make sure the files were there, if something else depended on them. But this prevents someone from accessing the annotations if they don't have the wav files. Which is the opposite of the point of this package.

It also requires extra logic from a downstream library -- e.g. I'm hitting these errors in vak right now because I'm trying to open the annotation file inside a directory where I don't have (and don't want to have) the wav files -- I'm using the annotations with spectrograms generated from the audio.

So this removes the errors -- they're more trouble than they're worth. Will do the same in the current version, but vak still depends on 3.4.x