heuristic.Heuristic

heuristic.Heuristic(self, heuristic_path=None, heuristic_dict=None)

A measurement heuristic class

Parameters

Name Type Description Default
heuristic_path Path | str Path to the heurstic yaml file. Defaults to None. None
heuristic_dict dict A heuristic dictionary. Defaults to None. None

Attributes

Name Type Description
heuristic str The name of the measurement point heuristics
default str The default landmark expression to use
specifics list[Specific] A list of specific measurement point landmarks.

Methods

Name Description
apply_heuristic Applies the heuristic to a FormantArray, and

apply_heuristic

heuristic.Heuristic.apply_heuristic(label, formants)

Applies the heuristic to a FormantArray, and returns the appropriate slice.

Parameters

Name Type Description Default
label str The label of the formant track. This is matched against the labels in the specifics. required
formants FormantArray The formants to evaluate against. required

Returns

Type Description
Slice The formant slice at the designated landmark