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

Update segments.py to handle uppercase file extensions #30

Merged
merged 1 commit into from
May 10, 2022

Conversation

jimmyknowles
Copy link
Contributor

First off, thanks for all your hard work on this project. We're excited about being able to use it. We just got our first test recordings back from the field and ran them through analyze.py and everything worked fine. We are using audiomoths and their file naming format is “YYYYMMDD_hhmmss.WAV” with a capitalized .WAV extension.

analyze.py seems to work fine since on line 37 of analyze.py you use a .lower() to convert the extension to lowercase. segments.py doesn't have this .lower() on line 41 so the dictionary named data doesn't get populated when running through the files in 'apath'. I forked this and made the change to line 41 in segments.py

if f.split('.')[-1].lower() in allowed_filetypes['audio']:

@jimmyknowles jimmyknowles changed the title Update segments.py Update segments.py to handle uppercase file extensions May 4, 2022
@kahst kahst merged commit b5359d4 into kahst:main May 10, 2022
@kahst
Copy link
Owner

kahst commented May 10, 2022

Thanks, good catch.

Josef-Haupt pushed a commit to Josef-Haupt/BirdNET-Analyzer that referenced this pull request Feb 24, 2024
Update segments.py to handle uppercase file extensions
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

Successfully merging this pull request may close these issues.

2 participants