pyannote-core icon indicating copy to clipboard operation
pyannote-core copied to clipboard

[WIP] Tiered annotations

Open hadware opened this issue 1 year ago • 2 comments

Old idea, finally took some time to implement it.

This is more or less an implementation of the Praat/Elan tiered structure. Here are a couple of key points for this

  • There are two data structures TieredAnnotation and Tier. A TieredAnnotation is made out of Tiers
  • The structure is basically and schematically a dict of dict : TieredAnnotation[str, Tier[Segment,Label]]
  • A Tier is a thin wrapper over a timeline, used to keep store segments and take care of the cropping/support/etc-related operations
  • The TieredAnnotation shouldn't have that many available methods other than:
    • accessing tiers and tiers information
    • cropping/extruding/etc (all just done by the underlying Tiers)
    • Iterating over segment
  • Support for textigrid files parsing is optional, and added by running pip install pyannote.core[textgrid]. This installs textgrid-parser, my sly-based parser.

I'll follow up with a couple of questions to tune my implem to your preferences

hadware avatar Aug 26 '22 12:08 hadware