rlackey commited on
Commit
4ec9679
·
1 Parent(s): 42be1b0

Lower chord confidence threshold from 0.35 to 0.20 for better detection

Browse files
Files changed (1) hide show
  1. modules/chords.py +2 -2
modules/chords.py CHANGED
@@ -308,11 +308,11 @@ def extract_chords(audio_path, min_duration=1.0):
308
  chord, conf = match_chord_template_with_confidence(frame, templates, 'harmony')
309
  raw_chords.append((float(time), chord, float(conf)))
310
 
311
- # Second pass: consolidate with minimum duration and higher confidence
312
  consolidated = []
313
  current_chord = None
314
  current_start = 0.0
315
- confidence_threshold = 0.35 # Higher threshold for cleaner detection
316
 
317
  for time, chord, conf in raw_chords:
318
  if conf >= confidence_threshold:
 
308
  chord, conf = match_chord_template_with_confidence(frame, templates, 'harmony')
309
  raw_chords.append((float(time), chord, float(conf)))
310
 
311
+ # Second pass: consolidate with minimum duration and reasonable confidence
312
  consolidated = []
313
  current_chord = None
314
  current_start = 0.0
315
+ confidence_threshold = 0.20 # Balanced threshold - not too noisy, not too strict
316
 
317
  for time, chord, conf in raw_chords:
318
  if conf >= confidence_threshold: