bluenevus commited on
Commit
9b337b9
·
verified ·
1 Parent(s): b6fa4d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -170,7 +170,7 @@ def redistribute_codes(code_list, snac_model):
170
  audio_hat = snac_model.decode(codes)
171
  return audio_hat.detach().squeeze().cpu().numpy() # Always return CPU numpy array
172
 
173
- def detect_silence(audio, threshold=0.005, min_silence_duration=1.1):
174
  sample_rate = 24000 # Adjust if your sample rate is different
175
  is_silent = np.abs(audio) < threshold
176
  silent_regions = np.where(is_silent)[0]
 
170
  audio_hat = snac_model.decode(codes)
171
  return audio_hat.detach().squeeze().cpu().numpy() # Always return CPU numpy array
172
 
173
+ def detect_silence(audio, threshold=0.005, min_silence_duration=1.3):
174
  sample_rate = 24000 # Adjust if your sample rate is different
175
  is_silent = np.abs(audio) < threshold
176
  silent_regions = np.where(is_silent)[0]