Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,6 +24,7 @@ def get_labels(audio_fp, threshold, min_speech_duration_ms, min_silence_duration
|
|
| 24 |
audio = AudioSegment.from_file(audio_fp)
|
| 25 |
speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-40)
|
| 26 |
speech_timestamps = list(filter(lambda x: x[1]-x[0] > min_speech_duration_ms, speech_timestamps))
|
|
|
|
| 27 |
labels_str = []
|
| 28 |
labels = []
|
| 29 |
|
|
|
|
| 24 |
audio = AudioSegment.from_file(audio_fp)
|
| 25 |
speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-40)
|
| 26 |
speech_timestamps = list(filter(lambda x: x[1]-x[0] > min_speech_duration_ms, speech_timestamps))
|
| 27 |
+
speech_timestamps = [{"start": s[0], "end": s[1]}]
|
| 28 |
labels_str = []
|
| 29 |
labels = []
|
| 30 |
|