klay-music / klay-beam

Our Apache Beam Transforms and Pipelines
1 stars 0 forks source link

Explicity return `sr = None` when librosa load fails #70

Closed cyrusvahidi closed 11 months ago

cyrusvahidi commented 11 months ago

fixes #69

CharlesHolbrow commented 11 months ago

Thanks for catching the bug in #69. AND I really appreciate the test.

This is definitely an improvement from the current implementation. The ideal behavior of this should match the behavior of LoadWithTorchaudio https://github.com/klay-music/klay-beam/blob/bc8e8ddf11dc6e2d0e87bd1d98c5c25efece7ece/klay_beam/src/klay_beam/torch_transforms.py#L79-L88

That is: output the failure warnings to a secondary output, which enables us to log and separately handle invalid files as seen in this job)