surya5289 commited on
Commit
17eac59
·
verified ·
1 Parent(s): e9777c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ def generate_mel_spectrogram(audio_path, sr=22050, n_mels=128, fmin=0, fmax=7000
20
 
21
  def detect_zero_db(spectrogram):
22
  # Create a binary mask where the spectrogram values are close to 0 dB
23
- threshold = -10 # +0 dB threshold
24
- mask = np.isclose(spectrogram, threshold, atol=17) # Use a tolerance to include values close to 0 dB
25
 
26
  return mask
27
 
 
20
 
21
  def detect_zero_db(spectrogram):
22
  # Create a binary mask where the spectrogram values are close to 0 dB
23
+ threshold = -25 # +0 dB threshold
24
+ mask = np.isclose(spectrogram, threshold, atol=10) # Use a tolerance to include values close to 0 dB
25
 
26
  return mask
27