SpacingHeuristic

SpacingHeuristic(top=field(default_factory=lambda : [3]), bottom=field(default_factory=lambda : [1, 2]), top_diff=2000, bottom_diff=500)

A class for defining formant spacing heuristics.

Parameters

Name Type Description Default
top list[int] The top formants to evaluate spacing on (or value, if the list is only 1 value long). field(default_factory=lambda : [3])
bottom list[int] The bottom formants to evaluate spacing on. field(default_factory=lambda : [1, 2])
top_diff float | int | np.floating The spacing of the top formants 2000
bottom_diff float | int | np.floating The spacing of the bottom formants 500

Methods

Name Description
eval Evaluate whether or not the track passes

eval

SpacingHeuristic.eval(track)

Evaluate whether or not the track passes the heuriustic

Parameters

Name Type Description Default
track OneTrack The track to evaluate. required

Returns

Type Description
Literal[0 | np.inf] If the track passes, 0. If the track doesn’t pass, np.inf.