Skip to content

ENH: Add Segments and Boxes class, have vocalpy.segment functions return them #127

@NickleDave

Description

@NickleDave

This supercedes other issues that I will link and close here: #49, #50, #51

The core idea is that a vocalpy.segment function can return one of two things:

  1. Segments, a set of line segments. For multiple reasons (detailed in linked issues) we choose to represent this segmentation $S$ of a digital signal $y[n]$ with $N$ samples as a series of $m$ consecutive, non-overlapping segments $s_i$ where each $s_i$ is a tuple with a start time (an integer) index and a duration (length in number of samples) $(t_i, d_i)$
  2. Boxes, a set of boxes ... where I don't have a particularly strong opinion about the representation just yet.

Importantly, both Segments and Boxes can have a Sound and Spectrogram instance associated with each element of the set. This gives us a way to extract features directly from a segmentation, without needed to somehow use the segmentation to index back into a Sound or Spectrogram

Metadata

Metadata

Assignees

Labels

Acoustic featureIssues related to the feature module, acoustic features and feature extractionENH: enhancementNew feature or requestSegmentationA segmentation algorithm or issues related to vocalpy.segment

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions