Skip to content

The bench

Every threshold of trueflac was set on the bench, and a change to the detection is only accepted when the bench says so. It rebuilds its files from public recordings: no audio is stored in the repository.

The bench needs ffmpeg with libmp3lame, libopus and, on macOS, aac_at (Apple’s AAC encoder), and oggenc for Vorbis. On macOS:

Terminal window
brew install ffmpeg vorbis-tools
uv run bench/build.py # once: about 4 GB in bench/data/, about 20 minutes
uv run bench/score.py # about 8 minutes

build.py skips the files that already exist, so it can be run again after a change to the list.

  • Genuine: 22 clips of 60 seconds, streamed from the Internet Archive and converted to 44.1 kHz/16 bits: 10 from Nine Inch Nails, The Slip, 6 from Kimiko Ishizaka, The Open Goldberg Variations, and 6 transfers of 78 rpm discs from the Great 78 Project. Rock, solo piano and old recordings: three ways for the highs to be quiet.
  • Fakes: each genuine clip encoded with MP3 128, 192, 256 and 320 kbit/s and V0 (LAME), AAC 256 kbit/s (ffmpeg’s and Apple’s encoders), Opus 192 kbit/s and Vorbis q6, then decoded back to FLAC 44.1 kHz/16 bits by ffmpeg, without dither.
  • Other decoders: the same fakes decoded with triangular dither, noise-shaped dither or to 24 bits, as players and converters do.
  • Dithered genuine: the genuine clips with a small gain change and dither, as a CD master leaves them.
  • Other formats, 8 clips each: genuine clips at 48 and 96 kHz in 24 bits, in mono, of 3 seconds, in WAV and in AIFF, and fakes in the same shapes.
group suspect total cutoffs (kHz)
genuine 0 22 max grid 5.8 []
mp3_128 22 22 max grid 63.0 [13.5, 14.8, 14.9, ...]
opus_192 17 22 max grid 4.5 [20.0, 20.0, 20.0, ...]

For each group: the files flagged, the highest grid contrast, and the cuts found. Under it, FALSE ACCUSATION lines name the genuine files flagged and missed lines the fakes that passed. The last line gives the time per file.

Every genuine* group must stay at 0. A genuine clip flagged is a false accusation, and it weighs more than any number of fakes caught. A pull request that changes the detection gives the score before and after.

The current results are on Results and limits.

Built with Kiln