daveokpare commited on
Commit
086bde1
·
1 Parent(s): 652e74c

Return text and state output

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -11,13 +11,11 @@ def transcribe(audio, state=""):
11
 
12
  print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
13
 
14
- output = ""
15
-
16
  for segment in segments:
17
  print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
18
- output += segment.text
19
 
20
- return output
21
 
22
 
23
  gr.Interface(
 
11
 
12
  print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
13
 
 
 
14
  for segment in segments:
15
  print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
16
+ state += segment.text + " "
17
 
18
+ return state, state
19
 
20
 
21
  gr.Interface(