SpacingHeuristic
SpacingHeuristic(
top=(lambda: [3])(),
bottom=(lambda: [1, 2])(),
top_diff=2000,
bottom_diff=500,
)
A class for defining formant spacing heuristics.
Parameters
| top |
list[int] |
The top formants to evaluate spacing on (or value, if the list is only 1 value long). |
(lambda: [3])() |
| bottom |
list[int] |
The bottom formants to evaluate spacing on. |
(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
| eval |
Evaluate whether or not the track passes |
eval
SpacingHeuristic.eval(track)
Evaluate whether or not the track passes the heuriustic
Parameters
| track |
OneTrack |
The track to evaluate. |
required |
Returns
|
Literal[0 | np.inf] |
If the track passes, 0. If the track doesn’t pass, np.inf. |