Upload app.py
Browse files
app.py
CHANGED
|
@@ -41,17 +41,17 @@ demo = gr.Blocks()
|
|
| 41 |
|
| 42 |
mic_translate = gr.Interface(
|
| 43 |
fn=speech_to_speech_translation,
|
| 44 |
-
inputs=gr.Audio(
|
| 45 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
| 46 |
)
|
| 47 |
|
| 48 |
file_translate = gr.Interface(
|
| 49 |
fn=speech_to_speech_translation,
|
| 50 |
-
inputs=gr.Audio(
|
| 51 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
| 52 |
)
|
| 53 |
|
| 54 |
with demo:
|
| 55 |
gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
|
| 56 |
|
| 57 |
-
demo.launch(
|
|
|
|
| 41 |
|
| 42 |
mic_translate = gr.Interface(
|
| 43 |
fn=speech_to_speech_translation,
|
| 44 |
+
inputs=gr.Audio(sources="microphone", type="filepath"),
|
| 45 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
| 46 |
)
|
| 47 |
|
| 48 |
file_translate = gr.Interface(
|
| 49 |
fn=speech_to_speech_translation,
|
| 50 |
+
inputs=gr.Audio(sources="upload", type="filepath"),
|
| 51 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
| 52 |
)
|
| 53 |
|
| 54 |
with demo:
|
| 55 |
gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
|
| 56 |
|
| 57 |
+
demo.launch()
|