Commit
·
b061611
1
Parent(s):
f060a86
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,8 @@ def speech_to_speech_translation(audio):
|
|
29 |
translated_text = translate(audio)
|
30 |
synthesised_speech = synthesise(translated_text)
|
31 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
32 |
-
return
|
|
|
33 |
|
34 |
|
35 |
title = "Cascaded STST"
|
@@ -53,7 +54,8 @@ mic_translate = gr.Interface(
|
|
53 |
file_translate = gr.Interface(
|
54 |
fn=speech_to_speech_translation,
|
55 |
inputs=gr.Audio(source="upload", type="filepath"),
|
56 |
-
outputs=gr.
|
|
|
57 |
examples=[["./example.wav"]],
|
58 |
title=title,
|
59 |
description=description,
|
|
|
29 |
translated_text = translate(audio)
|
30 |
synthesised_speech = synthesise(translated_text)
|
31 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
32 |
+
return translated_text
|
33 |
+
#return 16000, synthesised_speech
|
34 |
|
35 |
|
36 |
title = "Cascaded STST"
|
|
|
54 |
file_translate = gr.Interface(
|
55 |
fn=speech_to_speech_translation,
|
56 |
inputs=gr.Audio(source="upload", type="filepath"),
|
57 |
+
outputs=gr.outputs.Textbox(),
|
58 |
+
#outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
59 |
examples=[["./example.wav"]],
|
60 |
title=title,
|
61 |
description=description,
|