vocalpy.Annotation#
- class vocalpy.Annotation(data: Annotation, path: Path)[source]#
Bases:
object
Class that represents annotation data.
- Attributes:
- datacrowsetta.Annotation
- pathpathlib.Path
Methods
read
(path, format, **kwargs)Read an annotation from a file
- __init__(data: Annotation, path: Path) None #
Method generated by attrs for class Annotation.
Methods
__init__
(data, path)Method generated by attrs for class Annotation.
read
(path, format, **kwargs)Read an annotation from a file
Attributes
data
path
- classmethod read(path: str | Path, format: str, **kwargs) Annotation [source]#
Read an annotation from a file
- Parameters:
- pathstr, pathlib.Path
Path to file containing annotations.
- formatstr
Annotation file format. Must be a valid format recognized by
crowsetta
.- kwargskeyword arguments
Optional keyword arguments. If specified, these are passed to
crowsetta.Transcriber.from_file()
.
- Returns:
- annotAnnotation
An
Annotation
instance that contains the annotations read frompath
.