wip
This commit is contained in:
parent
fc15d794a6
commit
e126ca829d
1 changed files with 2 additions and 2 deletions
4
process
4
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)
|
BLOCK_SECONDS = 3 # seconds (longer means more frequency resolution, but less time resolution)
|
||||||
DETECTION_DISTANCE = 30 # seconds (minimum time between detections)
|
DETECTION_DISTANCE = 30 # seconds (minimum time between detections)
|
||||||
BLOCK_OVERLAP_FACTOR = 0.8 # overlap between blocks (0.8 means 80% overlap)
|
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):
|
def process_recording(filename):
|
||||||
print('processing', filename)
|
print('processing', filename)
|
||||||
|
@ -67,7 +67,7 @@ def process_recording(filename):
|
||||||
# check for detection criteria
|
# check for detection criteria
|
||||||
max_freq_detected = DETECT_FREQUENCY_FROM <= max_freq <= DETECT_FREQUENCY_TO
|
max_freq_detected = DETECT_FREQUENCY_FROM <= max_freq <= DETECT_FREQUENCY_TO
|
||||||
amplitude_detected = max_amplitude > AMPLITUDE_THRESHOLD
|
amplitude_detected = max_amplitude > AMPLITUDE_THRESHOLD
|
||||||
low_noise_detected = noise < 0.1
|
low_noise_detected = noise < MAX_NOISE
|
||||||
|
|
||||||
# conclude detection
|
# conclude detection
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in a new issue