Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,6 +30,8 @@ def get_labels(audio_fp, threshold, min_speech_duration_ms, min_silence_duration
|
|
| 30 |
return_seconds=True)
|
| 31 |
labels_str = []
|
| 32 |
labels = []
|
|
|
|
|
|
|
| 33 |
|
| 34 |
for i, st in enumerate(speech_timestamps):
|
| 35 |
labels_str.append(f"{st['start']}\t{st['end']}\tSound {i+1}")
|
|
@@ -77,7 +79,7 @@ interface = gr.Interface(
|
|
| 77 |
gr.Number(label="min_speech_duration_ms", value=250, info="default (250)"),
|
| 78 |
gr.Number(label="min_silence_duration_ms", value=100, info="default (100)"),
|
| 79 |
gr.Checkbox(label="Auto merge", value=True),
|
| 80 |
-
gr.
|
| 81 |
gr.Number(label="Approx Max Segment Length", value=12)
|
| 82 |
],
|
| 83 |
[
|
|
|
|
| 30 |
return_seconds=True)
|
| 31 |
labels_str = []
|
| 32 |
labels = []
|
| 33 |
+
|
| 34 |
+
uppper_merge_threshold = float(uppper_merge_threshold)
|
| 35 |
|
| 36 |
for i, st in enumerate(speech_timestamps):
|
| 37 |
labels_str.append(f"{st['start']}\t{st['end']}\tSound {i+1}")
|
|
|
|
| 79 |
gr.Number(label="min_speech_duration_ms", value=250, info="default (250)"),
|
| 80 |
gr.Number(label="min_silence_duration_ms", value=100, info="default (100)"),
|
| 81 |
gr.Checkbox(label="Auto merge", value=True),
|
| 82 |
+
gr.Textbox(label="Gap max threshold value (seconds)", value=1),
|
| 83 |
gr.Number(label="Approx Max Segment Length", value=12)
|
| 84 |
],
|
| 85 |
[
|