PackageTrack
Sign in Get early access

audio_defect_detector

Pure Dart library to detect pops and clicks in WAV, AIFF and FLAC audio files using adaptive threshold analysis.

0.4.0 bovinemagnet/dart_pop_n_click

What this package is like to depend on

Last release 1 months ago

14 Jul 2026

Ships on a steady schedule

a new release about every 2 months

Nearly every release is documented

notes for 7 of 7 stable releases

Nothing withdrawn

no release was ever pulled

4 months old

7 releases · first in 2026

7 releases in the last 12 months

see the full history below

Release timeline

7 releases · Apr 2026 to Jul 2026
Release Pre-release

Releases

latest 7
  1. 0.4.0 14 Jul 2026
    Release notes
    • WAVE_FORMAT_EXTENSIBLE (0xFFFE) WAV support — PCM and IEEE float resolved via the SubFormat GUID; oversized fmt extensions (cbSize > 22) are now skipped correctly
    • decodeWav() and WavData are now exported from the public library entry point, matching decodeAiff() and decodeFlac()
    • Fix: analyseSamples() with an empty channel list returns a clean result instead of throwing RangeError
    • Fix: decodePcmBytes() rejects a PcmFormat with zero channels or a bit depth below 8 with a descriptive ArgumentError instead of a bare division-by-zero error
    • Fix: the CLI flushes stdout before exiting so large JSON output is not truncated
    • Fix: A-law decode polarity was inverted (whole waveform flipped) in AIFF-C alaw files
    • Fix: float WAV files with a sample size other than 32-bit are now rejected instead of silently mis-decoded
    • Fix: minConfidence and maxDefects now apply to clipping and dropout defects, not just clicks and pops
    • Fix: WAV bit depths other than 8/16/24/32 are rejected up front instead of crashing the PCM decoder
    • Fix: malformed glob patterns (e.g. an unmatched [) no longer crash the CLI; a literal file with that name is still found
    • Fix: the CLI --format override is now honoured instead of always auto-detecting
    • Fix: I/O errors in CLI --raw mode exit cleanly with code 3 instead of an unhandled exception
    • Windows glob patterns using \ separators now match (converted for package:glob)
    • Dropout detection honours DetectorConfig.perChannel — each channel is scanned independently and defects carry their channel index, catching dropouts masked by the mono sum
    • New CLI options: --per-channel, --max-defects, --no-clipping, --no-dropouts, --no-dc-offset; verbose text output now includes per-channel DC offset
    • Adaptive MAD threshold evaluated on an interpolated grid — large-file analysis is dramatically faster with an effectively unchanged threshold
    • analyseFile() checks the file size before loading, so over-limit files fail fast without exhausting memory
    • Dependencies: dart_flac ^0.0.6, lints ^6.1.0
    Open source →
  2. 0.3.0 16 May 2026
    Release notes

    Adds FLAC support: native FLAC streams can now be analysed alongside WAV and AIFF.

    What's new

    • FLAC support — native FLAC streams can now be analysed via analyseFile() / analyseBytes(), and decoded directly with the new decodeFlac() function returning FlacData
    • New flac_decoder.dart module wraps the pure-Dart dart_flac package; FLAC remains a no-native-dependency format
    • Format auto-detection now recognises the fLaC magic bytes and the .flac extension
    • Ogg-encapsulated audio is now explicitly rejected with UnsupportedFormatException
    • CLI analyse command and --format option accept flac

    Downloads

    Prebuilt audiodefect CLI binaries for linux-x64, macOS-arm64 and windows-x64 are attached below once the build completes.

    Open source →
    Release notes
    • FLAC support — native FLAC streams can now be analysed via analyseFile() / analyseBytes(), and decoded directly with the new decodeFlac() function returning FlacData
    • New flac_decoder.dart module wraps the pure-Dart dart_flac package; FLAC remains a no-native-dependency format
    • Format auto-detection now recognises the fLaC magic bytes and the .flac extension
    • Ogg-encapsulated audio is now explicitly rejected with UnsupportedFormatException
    • CLI analyse command and --format option accept flac
    Open source →
  3. 0.2.0 16 Apr 2026
    Release notes

    Release v0.2.0

    - AIFF-C fl32, ulaw and alaw codec support
    - Full glob syntax in CLI analyse
    - Single-source packageVersion constant

    Open source →
    Release notes
    • AIFF-C compression support extended: fl32 (32-bit big-endian float), ulaw (ITU-T G.711 μ-law) and alaw (ITU-T G.711 A-law)
    • CLI analyse command now accepts full glob syntax (*, **, ?, [abc], {a,b}) via the glob package
    • New packageVersion constant exported from the library; CLI --version now derives from a single source
    Open source →
  4. 0.1.0 13 Apr 2026
    Release notes

    v0.1.0 — Additional defect types

    Three new quality signals beyond pop/click:

    New Features

    • Clipping detection (DefectType.clipping) — flags runs of consecutive samples saturated at ±1.0
    • Dropout detection (DefectType.dropout) — flags unexpected digital silence mid-audio (surrounded by signal)
    • DC offset reporting — per-channel mean bias populated in AnalysisResult.dcOffsetPerChannel

    Configuration

    New DetectorConfig options with sensible defaults:

    • clippingThreshold (0.99), clippingMinRun (3)
    • dropoutSilenceThreshold (1e-4), dropoutMinMs (1.0), dropoutMaxMs (50.0)
    • dcOffsetThreshold (0.01)
    • detectClipping, detectDropouts, detectDcOffset toggles (all default true)

    Testing

    • Total test count: 209 (up from 192)

    Closes #5, #6, #7.

    Open source →
    Release notes
    • Clipping detection (DefectType.clipping) — flags runs of consecutive samples at ±1.0
    • Dropout detection (DefectType.dropout) — flags unexpected digital silence mid-audio
    • DC offset reporting — per-channel mean bias now included in AnalysisResult.dcOffsetPerChannel
    • New DetectorConfig thresholds: clippingThreshold, clippingMinRun, dropoutSilenceThreshold, dropoutMinMs, dropoutMaxMs, dcOffsetThreshold, and detectClipping/detectDropouts/detectDcOffset toggles
    • Closes #5, #6, #7
    Open source →
  5. 0.0.3 13 Apr 2026
    Release notes

    v0.0.3

    Licence Change

    • Relicensed from GPL-3.0 to Apache-2.0
    • Apache-2.0 is a permissive licence that allows use in proprietary and closed-source projects
    • No code changes in this release
    Open source →
    Release notes
    • Licence change: relicensed from GPL-3.0 to Apache-2.0 (permissive, allows use in proprietary projects)
    Open source →
  6. 0.0.2 12 Apr 2026
    Release notes

    v0.0.2

    Breaking Changes

    • analyseBytes(), analysePcm(), and analyseSamples() are now synchronous — they return AnalysisResult directly instead of Future<AnalysisResult>. Only analyseFile() remains async (file I/O).

    New Features

    • AIFF and AIFF-C format support (big-endian PCM and sowt little-endian variant)
    • Signed 8-bit PCM support (used by AIFF)
    • Auto-detection of AIFF files via magic bytes and .aiff/.aif/.aifc extensions

    Testing

    • Expanded test suite to 192 tests
    Open source →
    Release notes
    • Breaking: analyseBytes(), analysePcm(), and analyseSamples() are now synchronous — they return AnalysisResult directly instead of Future<AnalysisResult>. Only analyseFile() remains async (file I/O).
    • AIFF and AIFF-C format support (big-endian PCM and sowt little-endian variant)
    • Signed 8-bit PCM support (used by AIFF)
    • Auto-detection of AIFF files via magic bytes and .aiff/.aif/.aifc extensions
    • Expanded test suite to 192 tests
    Open source →
  7. 0.0.1 12 Apr 2026
    Release notes

    Initial Release

    Pure Dart library to detect pops and clicks in WAV audio files using adaptive threshold analysis.

    Features

    • Detect clicks (1–10 samples) and pops (10–150 samples) in WAV audio
    • Adaptive MAD-based threshold with configurable sensitivity (low/medium/high)
    • Support for PCM 8/16/24/32-bit and IEEE Float 32-bit WAV files
    • Raw PCM byte analysis via analysePcm() with PcmFormat descriptor
    • Pre-normalised sample analysis via analyseSamples() for integration with other decoders
    • Per-channel or mono-summed analysis
    • Confidence scoring with logistic function
    • Public median() and mad() statistical utilities
    • CLI tool with text and JSON output, glob support, batch processing, and raw PCM mode
    • Pure Dart — no native dependencies, works on all platforms

    CLI Usage

    dart pub global activate audio_defect_detector
    audiodefect analyse recording.wav --sensitivity=high --output=json
    audiodefect analyse decoded.raw --raw --sample-rate=44100 --bit-depth=16 --channels=2

    Library Usage

    import 'package:audio_defect_detector/audio_defect_detector.dart';
    
    final result = await analyseFile('recording.wav');
    print('Found ${result.defects.length} defects');
    Open source →
    Release notes
    • Initial release
    • WAV PCM (8/16/24/32-bit) and IEEE Float 32-bit support
    • Pop and click detection with adaptive MAD threshold
    • CLI tool audiodefect with text and JSON output
    • Configurable sensitivity (low/medium/high)
    • Per-channel or mono-summed analysis
    • Raw PCM byte analysis via analysePcm() with PcmFormat descriptor
    • Pre-normalised sample analysis via analyseSamples()
    • Public median() and mad() statistical utilities
    • decodePcmBytes() for manual PCM-to-float conversion
    • CLI --raw mode with --sample-rate, --bit-depth, --channels, --float options
    • Comprehensive test suite (153 tests)
    • Security hardening: file size limits, WAV chunk validation, block alignment checks
    • AIFF and AIFF-C format support (standard big-endian and sowt little-endian variant)
    • Signed 8-bit PCM support (used by AIFF)
    • Auto-detection of AIFF files via magic bytes and .aiff/.aif/.aifc extensions
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive