Offex commited on
Commit
828b2c6
Β·
verified Β·
1 Parent(s): de8428e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -16,14 +16,15 @@ def remove_silence(audio_path):
16
 
17
  wav = read_audio(audio_path, sampling_rate=16000)
18
 
19
- # πŸ”΄ YAHAN MAGIC HUA HAI: AI ko aur strict banaya gaya hai πŸ”΄
20
  speech_timestamps = get_speech_timestamps(
21
  wav,
22
  model,
23
  sampling_rate=16000,
24
- threshold=0.5, # Aawaz pehchanne ki limit
25
- min_silence_duration_ms=50, # Agar 50 millisecond ka bhi gap ho, toh use cut kar do (Pehle ye zyada tha)
26
- speech_pad_ms=10 # Aawaz ke aage-peeche ka gap sirf 10ms rakha hai (Pehle AI zyada gap chhod raha tha)
 
27
  )
28
 
29
  if not speech_timestamps:
@@ -61,16 +62,16 @@ with gr.Blocks(css=css, title="AI Silence Remover") as iface:
61
 
62
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
63
 
64
- gr.Markdown("<h1 style='text-align: center;'>πŸŽ™οΈ AI Silence Remover (Aggressive Mode)</h1>")
65
- gr.Markdown("<p style='text-align: center;'>Apni audio upload karein. Yeh version chote se chote gap ko bhi cut karega!</p>")
66
 
67
  with gr.Row():
68
  audio_in = gr.Audio(type="filepath", label="Raw Audio Upload Karein")
69
 
70
- submit_btn = gr.Button("Submit", variant="primary")
71
 
72
  with gr.Row():
73
- audio_out = gr.Audio(type="filepath", label="Processed Audio (Without Silence)")
74
 
75
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
76
 
 
16
 
17
  wav = read_audio(audio_path, sampling_rate=16000)
18
 
19
+ # πŸ”₯ YAHAN EXTREME MODE ON KIYA HAI πŸ”₯
20
  speech_timestamps = get_speech_timestamps(
21
  wav,
22
  model,
23
  sampling_rate=16000,
24
+ threshold=0.8, # Confidence high kar diya (choti aawazon ko ignore karega)
25
+ min_silence_duration_ms=10, # 10ms gap bhi cut
26
+ speech_pad_ms=0, # ZERO padding (Safety margin hata diya)
27
+ min_speech_duration_ms=50 # Agar 50ms se choti aawaz hai, toh use noise maan kar uda dega
28
  )
29
 
30
  if not speech_timestamps:
 
62
 
63
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
64
 
65
+ gr.Markdown("<h1 style='text-align: center;'>πŸŽ™οΈ AI Silence Remover (Extreme Mode πŸ”₯)</h1>")
66
+ gr.Markdown("<p style='text-align: center;'>Yeh version zero gap chhodega! Ekdum border-to-border sharp cuts ke liye.</p>")
67
 
68
  with gr.Row():
69
  audio_in = gr.Audio(type="filepath", label="Raw Audio Upload Karein")
70
 
71
+ submit_btn = gr.Button("Cut Silence (Extreme)", variant="primary")
72
 
73
  with gr.Row():
74
+ audio_out = gr.Audio(type="filepath", label="Processed Audio (Zero Gaps)")
75
 
76
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
77