-
Notifications
You must be signed in to change notification settings - Fork 7
No strptime format #306
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
No strptime format #306
Conversation
|
Hey! I think the PR is ready, I just added some documentation on the behaviour with non-timestamped audio files. Can anyone take a look at this? If we can merge it quickly, I'll publish a pre-release version of OSEkit for us to share to Naturalis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked perfectly well on my tests, I have just not examined how you addressed the need for installing new libraries to make this branch work (conda install liibsndfile) ?
Also, your corresponding example in doc is nice , i was wondering whether your audio files have different durations or not ? i think it should be highlighted as a file specificity in the example because these non timestamped files will be mostly found in large heterogeneous datasets with a great diversity of file durations (at least this is the case with Naturalis)
so i think in the doc i would have started with a simpler more basic example , ie just computing a spectrogram on each entire file whatever their duration
but this can be kept for a future PR , i approve changes already
These libraries are not python-related: The python soundfile module we use is supported through the cross-platform libsndfile C library: we updated soundfile, but having an up-to-date libsndfile installed is up to the user. That's why we install it with conda (which manages both python and non-python libraries in its venvs) and do not mention it in the project dependencies (which are python dependencies).
Good point. As of now, I simply duplicated the timestamped example audio files (which all last 10s indeed). I agree having a more heterogeneous example dataset with all types of formats and different durations would feel closer to what users will encounter on real projects! |
|
thanks @Gautzilla , and when testing your branch I was wondering whether it would not be useful to have the installation procedure with conda described in the doc installation part, including how it works with uv , it did not seem very clear on this PR i think it will be useful for our team using datarmor to have this easily findable , but also for external users with moderate technical skills ; having several installation procedures with detailed description should facilitate accessibility to our codes |
Why not, it couldn't hurt anyways! But if the aim is to participate in OSEkit's development, then I push uv in the docs because syncing the dev venvs is essential to avoid problems! |
|
actually in the legacy version i liked the fact that we had two sections in the install proceedure , one for user only and the other for user+dev (although it is already quite obvious with pip vs git , but the more explicit the better! ) typically your note above on uv should be made public not to scare beginner devs , i guess uv is not yet very used among PAM users i will propose an update of the doc in this direction you will tell me what you think |

🐳 What's new?
This PR includes a default behaviour if files are not timestamped.
🐳 How does it work?
Basically, if the
strptime_formatargument of a code api datasetfrom_folder()method is set toNone, the first valid file will be set as beginning at the newfirst_file_begintimestamp (which has a default value), and each following valid file will begin at the end of the previous one.🐳 Some more stuff
To make this thing work with the example audio data provided by Naturalis, I had some tiny stuff in this PR:
AudioData.get_value()now returns a 2D array even for mono files. This helps with consistency across files.