Testys commited on
Commit
8e7b22f
Β·
verified Β·
1 Parent(s): 60b383e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -29,7 +29,8 @@ with open("config.yaml") as f:
29
  detector = get_detector(CFG)
30
 
31
  # ───────────────────────────── alert sound (read once)
32
- wav_path = CFG["alerting"].get("alert_sound_path", "alert.wav")
 
33
  try:
34
  ALERT_SR, ALERT_DATA = sf.read(wav_path, dtype="float32")
35
  logging.info(f"Loaded alert sound: {wav_path} ({len(ALERT_DATA)/ALERT_SR:.2f}s)")
@@ -71,7 +72,7 @@ def process_live_frame(frame, last_alert_ts):
71
 
72
  audio_out = None
73
  new_last_alert_ts = last_alert_ts
74
- ALERT_COOLDOWN = CFG["alerting"].get("alert_cooldown_seconds", 7)
75
 
76
  if (
77
  ALERT_DATA is not None
 
29
  detector = get_detector(CFG)
30
 
31
  # ───────────────────────────── alert sound (read once)
32
+ wav_path = CFG["alerting"].get("alert_sound_path")
33
+ logging.info(f"Processing {wav_path}")
34
  try:
35
  ALERT_SR, ALERT_DATA = sf.read(wav_path, dtype="float32")
36
  logging.info(f"Loaded alert sound: {wav_path} ({len(ALERT_DATA)/ALERT_SR:.2f}s)")
 
72
 
73
  audio_out = None
74
  new_last_alert_ts = last_alert_ts
75
+ ALERT_COOLDOWN = CFG["alerting"].get("alert_cooldown_seconds", 5)
76
 
77
  if (
78
  ALERT_DATA is not None