Neal Caren commited on
Commit
6178c80
1 Parent(s): 6003d58
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -42,10 +42,12 @@ def add_preface(row):
42
  return f'Speaker {speaker}: {text}'
43
 
44
  def transcribe(uploaded, nu_speakers):
45
-
46
- monotize(uploaded)
47
- tdf = audio_to_df(uploaded)
48
- sdf = segment(nu_speakers)
 
 
49
 
50
  ns_list = sdf[['start','speaker']].to_dict(orient='records')
51
 
@@ -83,6 +85,4 @@ if submit:
83
  bytes_data = uploaded.getvalue()
84
  with open('temp_audio', 'wb') as outfile:
85
  outfile.write(bytes_data)
86
- st.write('Converting audio file.')
87
- monotize('temp_audio')
88
  text = transcribe('temp_audio', nu_speakers)
 
42
  return f'Speaker {speaker}: {text}'
43
 
44
  def transcribe(uploaded, nu_speakers):
45
+ with st.spinner(text="Converting file..."):
46
+ monotize('temp_audio')
47
+ with st.spinner(text="Transcribing..."):
48
+ tdf = audio_to_df(uploaded)
49
+ with st.spinner(text="Segmenting..."):
50
+ sdf = segment(nu_speakers)
51
 
52
  ns_list = sdf[['start','speaker']].to_dict(orient='records')
53
 
 
85
  bytes_data = uploaded.getvalue()
86
  with open('temp_audio', 'wb') as outfile:
87
  outfile.write(bytes_data)
 
 
88
  text = transcribe('temp_audio', nu_speakers)