gigant commited on
Commit
395f293
1 Parent(s): 1767b27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -36,7 +36,7 @@ def speech_to_speech_translation(audio):
36
  translated_text = translate(audio)
37
  synthesised_speech = synthesise(translated_text)
38
  synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
39
- return [(16000, synthesised_speech), translated_text]
40
 
41
 
42
  title = "Cascaded STST"
@@ -52,7 +52,7 @@ demo = gr.Blocks()
52
  mic_translate = gr.Interface(
53
  fn=speech_to_speech_translation,
54
  inputs=gr.Audio(source="microphone", type="filepath"),
55
- outputs=[gr.Audio(label="Generated Speech", type="numpy"), gr.Textbox()],
56
  title=title,
57
  description=description,
58
  )
@@ -60,7 +60,7 @@ mic_translate = gr.Interface(
60
  file_translate = gr.Interface(
61
  fn=speech_to_speech_translation,
62
  inputs=gr.Audio(source="upload", type="filepath"),
63
- outputs=[gr.Audio(label="Generated Speech", type="numpy"), gr.Textbox()],
64
  examples=[["./example.wav"]],
65
  title=title,
66
  description=description,
 
36
  translated_text = translate(audio)
37
  synthesised_speech = synthesise(translated_text)
38
  synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
39
+ return (16000, synthesised_speech)
40
 
41
 
42
  title = "Cascaded STST"
 
52
  mic_translate = gr.Interface(
53
  fn=speech_to_speech_translation,
54
  inputs=gr.Audio(source="microphone", type="filepath"),
55
+ outputs=gr.Audio(label="Generated Speech", type="numpy"),
56
  title=title,
57
  description=description,
58
  )
 
60
  file_translate = gr.Interface(
61
  fn=speech_to_speech_translation,
62
  inputs=gr.Audio(source="upload", type="filepath"),
63
+ outputs=gr.Audio(label="Generated Speech", type="numpy"),
64
  examples=[["./example.wav"]],
65
  title=title,
66
  description=description,