diff --git a/process b/process index 50a2d3f..0eb503c 100755 --- a/process +++ b/process @@ -22,7 +22,7 @@ AMPLITUDE_THRESHOLD = 200 # relative DB (rDB) (because not calibrated) BLOCK_SECONDS = 3 # seconds (longer means more frequency resolution, but less time resolution) DETECTION_DISTANCE = 30 # seconds (minimum time between detections) BLOCK_OVERLAP_FACTOR = 0.8 # overlap between blocks (0.8 means 80% overlap) - +MAX_NOISE = 0.1 # maximum noise level (relative DB) to consider a detection valid def process_recording(filename): print('processing', filename) @@ -67,7 +67,7 @@ def process_recording(filename): # check for detection criteria max_freq_detected = DETECT_FREQUENCY_FROM <= max_freq <= DETECT_FREQUENCY_TO amplitude_detected = max_amplitude > AMPLITUDE_THRESHOLD - low_noise_detected = noise < 0.1 + low_noise_detected = noise < MAX_NOISE # conclude detection if (