tempo_eval.read_estimate_annotations
- tempo_eval.read_estimate_annotations(corpus_name, namespace='tempo', validate=True)[source]
Read annotations for estimates.
- Parameters
corpus_name (
str
) – corpus name (corresponds to folder name). Seelist_estimate_corpus_names
to get a list of valid names.namespace (
Union
[str
,Iterable
[str
]]) – one or more jam annotation namespace(s), e.g.,tempo
for tempo annotations (see jams namespaces)validate (
bool
) – validate jam while reading (validation impacts performance negatively)
- Returns
jam annotation objects, organized as nested dicts with version and item ids as keys
- Return type
dict[str, dict[str, jams.Annotation]]
Note
By default, validate is True in order to stay safe. But since it affects performance quite a bit, you might want to turn validation off when using this function to keep your sanity.
- Example
>>> from tempo_eval import read_estimate_annotations, extract_tempo >>> smc_estimates = read_estimate_annotations('smc_mirex', validate=False) # turn validation off for speed >>> smc_schreiber2014_205 = smc_estimates['tempo']['schreiber2014/default']['SMC_205.jams'] >>> tempo = extract_tempo(smc_schreiber2014_205) >>> print(tempo) 79.7638
See also
To read reference values, use
read_reference_annotations
.