audio_defect_detector 0.3.0 copy "audio_defect_detector: ^0.3.0" to clipboard
audio_defect_detector: ^0.3.0 copied to clipboard

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

example/main.dart

import 'package:audio_defect_detector/audio_defect_detector.dart';

Future<void> main() async {
  // Configure the detector with high sensitivity and per-channel analysis.
  const config = DetectorConfig(
    sensitivity: Sensitivity.high,
    minConfidence: 0.3,
    perChannel: true,
  );

  try {
    final result = await analyseFile('recording.wav', config: config);

    print('Audio: ${result.metadata}');
    print('Aggregate confidence: '
        '${result.aggregateConfidence.toStringAsFixed(3)}');
    print('Defects found: ${result.defects.length}\n');

    for (final defect in result.defects) {
      print('  ${defect.offset.inMilliseconds}ms  '
          '${defect.type.name.padRight(5)}  '
          'ch${defect.channel}  '
          'confidence=${defect.confidence.toStringAsFixed(3)}');
    }
  } on UnsupportedFormatException catch (e) {
    print('Format error: $e');
  } on IoException catch (e) {
    print('I/O error: $e');
  }
}
0
likes
160
points
182
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Topics

#audio #analysis #wav #signal-processing

License

Apache-2.0 (license)

Dependencies

args, dart_flac, glob

More

Packages that depend on audio_defect_detector