Skip to content

Conversation

@Gautzilla
Copy link
Contributor

@Gautzilla Gautzilla commented Jan 26, 2026

🐋 What's new?

This PR adds some stuff to the API to help the user filtering out data:

Property/Method name Description Done
BaseData.populated_duration Return the total duration of non-empty items
BaseData.populated_ratio Return the ratio between the duration of non-empty items and the duration of the data
SpectroData.populated_duration Return the total duration of non-empty items if the SpectroData has associated files, otherwise the populated_duration of the linked AudioData
BaseDataset.remove_data_on_populated_ratio(threshold=0.) Remove all data that have a populated ratio lower than threshold

🐬Note

This PR resove #295

@Gautzilla Gautzilla requested a review from mathieudpnt January 26, 2026 15:34
@Gautzilla Gautzilla self-assigned this Jan 26, 2026
@Gautzilla Gautzilla changed the title [DRAFT] Data populated ratio Data populated ratio Jan 27, 2026
@Gautzilla Gautzilla marked this pull request as ready for review January 27, 2026 14:59
@Gautzilla
Copy link
Contributor Author

@mathieudpnt
image

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.

1 participant