Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from pydub import AudioSegment
|
|
7 |
|
8 |
def get_labels(audio_fp, min_speech_duration_ms, min_silence_duration_ms, auto_merge, uppper_merge_threshold, max_segment_length, end_extension, extend_small_segments, show_duration_label):
|
9 |
audio = AudioSegment.from_file(audio_fp.name).set_channels(1)
|
10 |
-
speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-
|
11 |
speech_timestamps = list(filter(lambda x: x[1]-x[0] > min_speech_duration_ms, speech_timestamps))
|
12 |
speech_timestamps = [{"start": s[0]/1000, "end": s[1]/1000} for s in speech_timestamps]
|
13 |
labels_str = []
|
|
|
7 |
|
8 |
def get_labels(audio_fp, min_speech_duration_ms, min_silence_duration_ms, auto_merge, uppper_merge_threshold, max_segment_length, end_extension, extend_small_segments, show_duration_label):
|
9 |
audio = AudioSegment.from_file(audio_fp.name).set_channels(1)
|
10 |
+
speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-60)
|
11 |
speech_timestamps = list(filter(lambda x: x[1]-x[0] > min_speech_duration_ms, speech_timestamps))
|
12 |
speech_timestamps = [{"start": s[0]/1000, "end": s[1]/1000} for s in speech_timestamps]
|
13 |
labels_str = []
|