smajumdar commited on
Commit
e69d5a9
1 Parent(s): 737d6ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -36,9 +36,9 @@ def transcribe(state, audio):
36
  audio = audio.astype(np.float32)
37
  audio /= np.max(np.abs(audio))
38
 
39
- #if state is None:
40
- # state = ""
41
- state = audio
42
 
43
  audio_data = process_audio_file(audio, sr)
44
 
@@ -57,8 +57,8 @@ def transcribe(state, audio):
57
 
58
  transcriptions = transcriptions[0]
59
 
60
- # state = state + transcriptions + " "
61
- return state, transcriptions
62
 
63
 
64
  iface = gr.Interface(
 
36
  audio = audio.astype(np.float32)
37
  audio /= np.max(np.abs(audio))
38
 
39
+ if state is None:
40
+ state = ""
41
+ # state = audio
42
 
43
  audio_data = process_audio_file(audio, sr)
44
 
 
57
 
58
  transcriptions = transcriptions[0]
59
 
60
+ state = state + transcriptions + " "
61
+ return state, state
62
 
63
 
64
  iface = gr.Interface(