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

Review and improve recording file name parsing. #216

Open
HaroldMills opened this issue May 3, 2023 · 2 comments
Open

Review and improve recording file name parsing. #216

HaroldMills opened this issue May 3, 2023 · 2 comments
Assignees

Comments

@HaroldMills
Copy link
Owner

Recording file names are currently parsed by the vesper.mpg_ranch.recording_file_parser module. For historical reasons, the module parses file names of some forms that are uncommon and unintuitive, but not of others that are more common and/or more intuitive. For example, issue #215 arose because the MPG-Ranch-specific parser _MpgRanchFileNameParser0 parses a file name like "Queens_20230502_010000_Z.WAV" not as specifying a UTC time but as specifying a local time and a comment of "Z". At a minimum, I'd like to remove MPG-Ranch-specific parsers that are more likely to cause trouble than be helpful and add parsers for the format of the above example and perhaps others that Vesper is likely to encounter.

It might also be a good idea to make recording file name parsers plugins. Note that if we do that, we may also want to provide a way for users to specify an order in which parsers should be tried.

@RichardLitt
Copy link
Contributor

Here's another format that might be good to have as a plugin: the AudioMoth file format. I've made a script that does this automatically, here. https://github.com/RichardLitt/vesper-audio-shim/blob/master/rename_audiomoth_recordings.py

@HaroldMills
Copy link
Owner Author

Thanks for that suggestion. The AudioMoth file names are tricky to handle since they include only start date and time but no station/sensor name. I have renamed (and resampled) AudioMoth files I've dealt with via a script much like your shim before importing them.

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

No branches or pull requests

2 participants