deepsync commited on
Commit
df05b61
·
verified ·
1 Parent(s): 78c4603

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ def get_labels(audio_fp, threshold, min_speech_duration_ms, min_silence_duration
9
  audio = AudioSegment.from_file(audio_fp)
10
  speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-40)
11
  speech_timestamps = list(filter(lambda x: x[1]-x[0] > min_speech_duration_ms, speech_timestamps))
12
- speech_timestamps = [{"start": s[0], "end": s[1]} for s in speech_timestamps]
13
  labels_str = []
14
  labels = []
15
 
 
9
  audio = AudioSegment.from_file(audio_fp)
10
  speech_timestamps = detect_nonsilent(audio, min_silence_len=min_silence_duration_ms, silence_thresh=-40)
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 = []
14
  labels = []
15