Systems and subsystems

ENF: mains hum

Tracks the 50 or 60 Hz hum a mains-powered recording chain leaves behind, and whether it is stable across the clip. Rule-based and mild on purpose: on our training data hum means a home studio, which means one real corpus, so a learned version would learn the corpus.

In plain words

The electrical network frequency (ENFElectrical network frequency: the faint 50 or 60 Hz hum a mains-powered recording chain leaves in a recording, and how stable it is. Evidence about the recording environment.) is the rubric's acoustic-environment technique: a genuine recording made near mains power carries a faint hum at the grid frequency, and a spliced or fabricated background may carry a hum that jumps. Stable hum is in about a third of LJ Speech clips and almost no generated audio, so it is corpus evidence, not class evidence, and it stays out of the score.

What goes in and comes out

In: the clip, silence-trimmed, capped and RMS-normalized. Out: the better of the 50 and 60 Hz candidates with its signal-to-noise ratio, the fraction of frames where it is present, its frequency, its spread and range; and one of three sentences: no hum, stable hum "consistent with a genuine electrical recording environment", or discontinuous hum "consistent with a fabricated or spliced background".

Where it lives

detectors/enf.py.

Parameters and where each is set

Status

Built; evidence only.

Numbers

Stable hum in 36%source: README.md, section what-did-not-work of LJ Speech clips and 21%source: README.md, section what-did-not-work of LibriSpeech; under 0.5%source: docs/architecture.md, section 11-shortcut-ledger of nine generators. Only 24source: README.md, section what-did-not-work test files carry hum. In the ablation it flagged 591source: README.md, section orchestration-what-routing-changes holdout rows without moving a score.

Known limits

It cannot be validated as a class detector on this data. A test clip with a stable hum can be a fake: worked example 5 is one.

Tests that pin it

tests/test_enf_detector.py: a stable 60 Hz hum, 50 Hz, none, a hum that jumps by 1 Hz mid-clip is discontinuous, digital silence, a short clip, contract and determinism, the analysis keys, registration.

Sources

The CPU detectors report, "ENF (mains hum) detector"; worked example 5.