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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ 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 = -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
 
20
 
21
  def detect_zero_db(spectrogram):
22
  # Create a binary mask where the spectrogram values are close to 0 dB
23
+ threshold = -40 # +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