Yurii Paniv commited on
Commit
e96206b
1 Parent(s): 6ede7a5

Show recognized text

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -43,12 +43,12 @@ def transcribe(audio):
43
  with torch.no_grad():
44
  wavs = synthesizer.tts(text)
45
  synthesizer.save_wav(wavs, fp)
46
- return fp.name
47
 
48
  gr.Interface(
49
  fn=transcribe,
50
  inputs=gr.inputs.Audio(source="microphone", type="filepath"),
51
- outputs=gr.outputs.Audio(label="Output"),
52
  article=f"<center><img src=\"{badge}\" alt=\"visitors badge\"/></center>",).launch()
53
 
54
  def chat(message, history):
 
43
  with torch.no_grad():
44
  wavs = synthesizer.tts(text)
45
  synthesizer.save_wav(wavs, fp)
46
+ return text, fp.name
47
 
48
  gr.Interface(
49
  fn=transcribe,
50
  inputs=gr.inputs.Audio(source="microphone", type="filepath"),
51
+ outputs=[gr.outputs.Textbox(label="Recognized text"),gr.outputs.Audio(label="Output")],
52
  article=f"<center><img src=\"{badge}\" alt=\"visitors badge\"/></center>",).launch()
53
 
54
  def chat(message, history):