nithinraok commited on
Commit
fb5c3ca
1 Parent(s): 81d7107

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -15,7 +15,8 @@ def run_diarization(path1):
15
  df = pd.DataFrame(columns=['start_time', 'end_time', 'speaker'])
16
  for idx,line in enumerate(rttm.splitlines()):
17
  split = line.split()
18
- start_time, end_time, speaker = split[3], split[4], split[7]
 
19
  df.loc[idx] = start_time, end_time, speaker
20
  return df
21
 
@@ -37,7 +38,8 @@ article = (
37
  "</p>"
38
  )
39
  examples = [
40
- "data/id10270_5r0dWxy17C8-00001.wav",
 
41
  ]
42
 
43
  interface = gr.Interface(
 
15
  df = pd.DataFrame(columns=['start_time', 'end_time', 'speaker'])
16
  for idx,line in enumerate(rttm.splitlines()):
17
  split = line.split()
18
+ start_time, duration, speaker = split[3], split[4], split[7]
19
+ end_time = float(start_time) + float(duration)
20
  df.loc[idx] = start_time, end_time, speaker
21
  return df
22
 
 
38
  "</p>"
39
  )
40
  examples = [
41
+ ["data/sample_interview_conversation.wav"],
42
+ ["data/id10270_5r0dWxy17C8-00001.wav"],
43
  ]
44
 
45
  interface = gr.Interface(