Skip to content

sadda.clinical

Voice-quality measures over an Audio — perturbation (jitter / shimmer), harmonics-to-noise ratios, cepstral peak prominence, the AVQI / ABI composite dysphonia indices, and the auxiliary component measures used to compute them.

Research use only. These measures are implemented from peer-reviewed publications with Praat-anchored validation where a Praat oracle exists, and as clean-room reproductions from publications where one doesn't (see the clinical-validation-references entry in DEVLOG.md). The composite AVQI / ABI indices are PROVISIONAL pending the authors' artifact for byte-level confirmation. Not a diagnostic tool — see the project README's "Intended use" section.

Stability tier: stable_clinical (same API commitment as Stable, with a distinct tier name to flag the research-use caveat).

Perturbation

perturbation builtin

perturbation(audio, *, pitch_floor_hz=75.0, pitch_ceiling_hz=600.0)

Computes jitter + shimmer for a sustained phonation. Raises ValueError if no voiced f0 is found or too few periods are detected (no-silent-fallback). Praat is the validation reference.

PerturbationReport

Jitter + shimmer over a sustained phonation. Fields are floats: jitter / relative shimmers are fractions (0.01 = 1%); shimmer_local_db is in dB.

__doc__ class-attribute

__doc__ = 'Jitter + shimmer over a sustained phonation. Fields are floats:\njitter / relative shimmers are fractions (0.01 = 1%);\n`shimmer_local_db` is in dB.'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'sadda._native'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__sadda_stability__ class-attribute

__sadda_stability__ = 'stable-clinical'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

jitter_local property

jitter_local

Jitter (local) — fraction.

jitter_ppq5 property

jitter_ppq5

Jitter (ppq5) — fraction.

jitter_rap property

jitter_rap

Jitter (rap) — fraction.

n_periods property

n_periods

Glottal periods the measures were computed over.

period_std_s property

period_std_s

Period standard deviation (PSD) — seconds. An ABI component.

shimmer_apq3 property

shimmer_apq3

Shimmer (apq3) — fraction.

shimmer_apq5 property

shimmer_apq5

Shimmer (apq5) — fraction.

shimmer_local property

shimmer_local

Shimmer (local) — fraction.

shimmer_local_db property

shimmer_local_db

Shimmer (local) — dB.

__repr__ method descriptor

__repr__()

Return repr(self).

Harmonics-to-noise

hnr builtin

hnr(audio, *, pitch_floor_hz=75.0, pitch_ceiling_hz=600.0, hop_seconds=0.01)

Mean harmonics-to-noise ratio (dB) of a sustained phonation, via the Boersma-1993 cross-correlation method (Praat's To Harmonicity (cc)). Raises ValueError if the signal is too short or silent.

hnr_d builtin

hnr_d(audio, *, pitch_floor_hz=75.0, pitch_ceiling_hz=600.0, band_lo_hz=500.0, band_hi_hz=1500.0, frame_size=8192)

HNR-D (dB): the Dejonckere–Lebacq harmonic-to-noise ratio in the 500–1500 Hz formant zone — an ABI component. CLEAN-ROOM / PROVISIONAL: reconstructed from the ABI papers' prose, not the authors' exact procedure. Raises ValueError if no voiced f0 or too few in-band harmonics. Intended for sustained vowels.

gne builtin

gne(audio, *, downsample_hz=10000, lpc_order=13, bandwidth_hz=1000.0, fshift_hz=300.0)

Glottal-to-Noise Excitation ratio (Michaelis et al. 1997), in [0, 1] — a breathiness / turbulent-noise correlate and an ABI component. ~1 for pulsatile (glottal) excitation, toward 0 for turbulent noise. Raises ValueError if the signal is too short. Intended for sustained vowels.

Cepstral

cpps builtin

cpps(audio, *, pitch_floor_hz=60.0, pitch_ceiling_hz=330.0)

Smoothed cepstral peak prominence (dB) of a sustained phonation (Praat's PowerCepstrogramGet CPPS). Raises ValueError if the signal is too short. Intended for sustained vowels.

h1_h2 builtin

h1_h2(audio, *, pitch_floor_hz=75.0, pitch_ceiling_hz=600.0)

H1–H2 (dB): level of the first harmonic minus the second, a glottal-source / open-quotient correlate and an ABI component. Uncorrected (no formant correction). Raises ValueError if no voiced f0 is found or the signal is too short. Intended for sustained vowels.

Spectral tilt / noise

hfno builtin

hfno(audio)

High-frequency noise level Hfno-6000 (dB): the LTAS level difference between the 0–6 kHz and 6–10 kHz bands. Larger ⇒ less high-frequency noise ⇒ less breathy. An ABI component. Requires a sample rate ≥ 20 kHz; raises ValueError otherwise.

Composite indices (provisional)

avqi builtin

avqi(cpps, hnr, shimmer_local_pct, shimmer_local_db, slope, tilt)

Acoustic Voice Quality Index v03.01 from its six components. Clean-room from the publications; not yet confirmed against the reference Praat script (exposed as PROVISIONAL). Units: CPPS / HNR / shimmer-dB / slope / tilt in dB, shimmer-local as a percent.

abi builtin

abi(cpps, jitter_pct, gne, hfno, hnr_d, h1_h2, shimmer_db, shimmer_pct, psd_s)

Acoustic Breathiness Index v01 (Barsties von Latoszek et al. 2017): a 0–10 breathiness score from its nine components. Clean-room from the published formula; PROVISIONAL — the HNR-D/Hfno definitions and the component unit conventions are not yet confirmed against the authors' artifact (so abi_from_audio is intentionally not provided). Units: CPPS / Hfno / HNR-D / H1−H2 / shimmer-dB in dB; GNE a ratio in [0,1]; jitter and shimmer-local as percents; PSD in seconds.