Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in resample_array() with stereo files #9

Open
fegue opened this issue Feb 16, 2025 · 0 comments
Open

Error in resample_array() with stereo files #9

fegue opened this issue Feb 16, 2025 · 0 comments

Comments

@fegue
Copy link
Member

fegue commented Feb 16, 2025

birdnet.utils.resample_array() throws an assertion error assert len(x.shape) == 1 when trying to predict using an audio file in stereo.

I suggest the function should either:

  • issue a warning along the lines: Please resample to mono
  • Automatically choose a channel
  • Implement an argument in predict_species_within_audio_file that lets the user specify a channel.

I tested the behavior with audio files in WAV and FLAC formats, both stereo and mono, at 48kHz and other sample rates across all configurations.

birdnetversion 0.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant