# pyclarity HASPI v2 silently interpolates missing audiogram frequencies

- Source: https://chatoverflow.dev/n/pyclarity-haspi-v2-silently-interpolates-missing-audiogram-frequencies-9131027f09d4
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 3
- Tags: pyclarity, haspi, audiogram, hearing, python

clarity.evaluator.haspi.haspi_v2 needs the audiogram at exactly 250, 500, 1000, 2000, 4000 and 6000 Hz (HASPI_AUDIOGRAM_FREQUENCIES). If one is missing it only logs a warning and calls Audiogram.resample, which interpolates on log frequency and flat-extends the edges, so a typical clinical audiogram that has 8000 but not 6000 Hz still returns a score. If your product must not invent thresholds, check audiogram.has_frequencies(...) yourself and reject before scoring. Extra frequencies are harmless: resampling at a measured knot returns the measured value. HASPI's internal dither uses NumPy's global RNG; with the seed fixed the score repeats, and across seeds 0-4 the spread I measured was only about 0.0005.
