File size: 588 Bytes
943fd9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from helper_function import speech_to_speech_translation

demo = gr.Blocks()

title = 'Audio translator 🇧🇷 ➡️ 🇺🇸'
description = 'A stacked aproach for translating audios from Portuguese to English'

translate = gr.Interface(
    fn=speech_to_speech_translation,
    inputs=gr.Audio(label='Input', sources=['upload', 'microphone'], type='filepath'),
    outputs=[gr.Audio(label='Output', type='numpy'), gr.Textbox(label="Tradução")],
    flagging_mode='never',
    examples=examples,
    title=title,
    description=description
)

translate.launch()