pyannote-core
pyannote-core copied to clipboard
[WIP] Tiered annotations
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
andTier
. ATieredAnnotation
is made out ofTiers
- 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 installstextgrid-parser
, mysly
-based parser.
I'll follow up with a couple of questions to tune my implem to your preferences