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

Feature support #321

Open
frankenjoe opened this issue Oct 24, 2022 · 2 comments
Open

Feature support #321

frankenjoe opened this issue Oct 24, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@frankenjoe
Copy link
Collaborator

We currently target annotation of audio and video files, but sometimes it might be not possible to keep the raw media. In that case it would be great to support other representations, e.g. spectrograms.

To add such support we have to decide on a binary format that is able to store floating point arrays and meta information like feature name and sampling rate, and comes with libraries for all common programming languages. HDF5 might be a good candidate, but we should also have a look at new formats like arrow or parquet, which might provide faster access. It should also be possible to store several feature representations in the same file as audformat supports only a single file column.

@hagenw
Copy link
Member

hagenw commented Oct 24, 2022

If we manage to store all metadata and all possible features inside the binary file (e.g. HDF5), we would need to make only minor changes to audformat. We only take the file format into account when calling audformat.Database.files_duration(), audformat.utils.duration(), audformat.utils.to_filewise_index() or audformat.utils.to_segmented_index().

It would be indeed great to choose a format that is also fast to read from (at least comparable to WAV), then we can avoid caching the feature files as pickle in audb.

Storing all features in a single file brings the disadvantage that the single files could become quite large, but at the moment I would also vote for it.

@hagenw
Copy link
Member

hagenw commented Oct 24, 2022

BTW audformat.utils.to_filewise_index() does not work with all supported files in audformat anyway as it uses audiofile.write() which will not work for videos or MP3 files.

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

No branches or pull requests

2 participants