xsarasola commited on
Commit
3b71270
·
verified ·
1 Parent(s): a5fcb05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -28,7 +28,8 @@ def transcribe_base(audio, language):
28
  'language': language}
29
 
30
  response = requests.post(os.getenv("api_url"), json=data).json()
31
- result = response["text"]
 
32
 
33
  end_time = time.time()
34
  print("-"*50)
@@ -36,7 +37,7 @@ def transcribe_base(audio, language):
36
  print(end_time-start_time)
37
  print("-"*50)
38
 
39
- return result
40
 
41
 
42
  def transcribe(audio_microphone, audio_upload, language):
@@ -65,7 +66,8 @@ with demo:
65
  value="eu")
66
  ],
67
  outputs=[
68
- gr.Textbox(label="Transcription", autoscroll=False)
 
69
  ],
70
  allow_flagging="never",
71
  )
 
28
  'language': language}
29
 
30
  response = requests.post(os.getenv("api_url"), json=data).json()
31
+ transcription = response["text"]
32
+ speaker_class_string = response["speaker_class_string"]
33
 
34
  end_time = time.time()
35
  print("-"*50)
 
37
  print(end_time-start_time)
38
  print("-"*50)
39
 
40
+ return transcription, speaker_class_string
41
 
42
 
43
  def transcribe(audio_microphone, audio_upload, language):
 
66
  value="eu")
67
  ],
68
  outputs=[
69
+ gr.Textbox(label="Transcription", autoscroll=False),
70
+ gr.Textbox(label="Speaker Identification", autoscroll=False)
71
  ],
72
  allow_flagging="never",
73
  )