Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,10 @@ import gradio as gr
|
|
2 |
|
3 |
#Get models
|
4 |
#ASR model for input speech
|
5 |
-
|
6 |
-
|
7 |
-
pipe = pipeline(task="automatic-speech-recognition",
|
8 |
-
model="facebook/hubert-large-ls960-ft")
|
9 |
-
speech2text = gr.Interface.from_pipeline(pipe,
|
10 |
-
inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
|
11 |
-
#speech2text = gr.Interface.load("huggingface/facebook/hubert-large-ls960-ft",
|
12 |
-
# inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
|
13 |
|
14 |
-
#translates
|
15 |
translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es",
|
16 |
outputs=gr.outputs.Textbox(label="English to Spanish Translated Text"))
|
17 |
#TTS model for output speech
|
|
|
2 |
|
3 |
#Get models
|
4 |
#ASR model for input speech
|
5 |
+
speech2text = gr.Interface.load("huggingface/facebook/hubert-large-ls960-ft",
|
6 |
+
inputs=gr.inputs.Audio(label="Record Audio", type="file", source = "microphone"))
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
+
#translates English to Spanish text
|
9 |
translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es",
|
10 |
outputs=gr.outputs.Textbox(label="English to Spanish Translated Text"))
|
11 |
#TTS model for output speech
|