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

FutureWarnings in Sycamore #211

Closed
hackdna opened this issue Oct 30, 2023 · 4 comments
Closed

FutureWarnings in Sycamore #211

hackdna opened this issue Oct 30, 2023 · 4 comments
Assignees
Labels
technical debt Cruft and maintenance issues

Comments

@hackdna
Copy link
Member

hackdna commented Oct 30, 2023

To reproduce:

pytest forest/sycamore/tests

Observed output:

forest/sycamore/tests/test_functions.py: 55 warnings
  /Users/ils475/code/onnelalab/forest/forest/sycamore/read_audio.py:136: FutureWarning: get_duration() keyword argument 'filename' has been renamed to 'path' in version 0.10.0.
  	This alias will be removed in version 1.0.
    all_durations.append(librosa.get_duration(

forest/sycamore/tests/test_functions.py: 55 warnings
  /Users/ils475/code/onnelalab/forest/forest/sycamore/read_audio.py:136: FutureWarning: PySoundFile failed. Trying audioread instead.
  	Audioread support is deprecated in librosa 0.10.0 and will be removed in version 1.0.
    all_durations.append(librosa.get_duration(

Expected output: no warnings

Notes:

Starting from version 1.1.0 libsndfile supports MP3 format (https://github.com/libsndfile/libsndfile/blob/master/docs/FAQ.md#q20--why-doesnt-libsndfile-support-mp3-q020)
This will probably require upgrading to Ubuntu 24.04 LTS (https://packages.ubuntu.com/search?libsndfile)

@clementzach
Copy link
Collaborator

@hackdna thanks for bringing this up.

The first warning is resolved in this pr (#222)

The second warning is not able to be resolved at this time. The warning will appear from librosa (librosa/librosa#1015) until their dependent library libsndfile gains the ability to read mp4 files. Progress on libsndfile's ability to read mp4 files can be seen here (libsndfile/libsndfile#389)

@hackdna
Copy link
Member Author

hackdna commented Nov 27, 2023

Thanks for addressing the first warning.

Does the second warning mean that librosa version 1.0 would potentially lose the ability to read mp3 files (at least until libsndfile gains that ability)? Does Forest need to be able to process mp3 files?

@clementzach
Copy link
Collaborator

Yes, librosa plans to deprecate using audioread. If they do so, forest's reading of mp4 files will be deprecated and there will be no information for duration spent on audio surveys. But, it seems like the deprecation doesn't have any super active plans--more information about that is here: librosa/librosa#1456

@hackdna
Copy link
Member Author

hackdna commented Nov 28, 2023

OK, thank you for looking in to this. It's good to have this information for future reference. I'll close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Cruft and maintenance issues
Projects
None yet
Development

No branches or pull requests

2 participants