Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ description = "Gradio Demo for fairseq S2S: speech-to-speech translation models.
|
|
11 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2107.05604' target='_blank'>Direct speech-to-speech translation with discrete units</a> | <a href='https://github.com/facebookresearch/fairseq/tree/main/examples/speech_to_speech' target='_blank'>Github Repo</a></p>"
|
12 |
|
13 |
examples = [
|
14 |
-
["enhanced_direct_s2st_units_audios_es-en_set2_source_12478_cv.flac",
|
15 |
]
|
16 |
|
17 |
io1 = gr.Interface.load("huggingface/facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022", api_key=st.secrets["api_key"])
|
@@ -29,7 +29,7 @@ def inference(mic,file,model):
|
|
29 |
|
30 |
gr.Interface(
|
31 |
inference,
|
32 |
-
[gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Input"),gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Input"),gr.inputs.Dropdown(choices=["xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022"], type="value", label="model")
|
33 |
],
|
34 |
gr.outputs.Audio(label="Output"),
|
35 |
article=article,
|
|
|
11 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2107.05604' target='_blank'>Direct speech-to-speech translation with discrete units</a> | <a href='https://github.com/facebookresearch/fairseq/tree/main/examples/speech_to_speech' target='_blank'>Github Repo</a></p>"
|
12 |
|
13 |
examples = [
|
14 |
+
[None,"enhanced_direct_s2st_units_audios_es-en_set2_source_12478_cv.flac","xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022"],
|
15 |
]
|
16 |
|
17 |
io1 = gr.Interface.load("huggingface/facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022", api_key=st.secrets["api_key"])
|
|
|
29 |
|
30 |
gr.Interface(
|
31 |
inference,
|
32 |
+
[gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Input"),gr.inputs.Audio(source="upload", type="filepath", optional=True, label="Input"),gr.inputs.Dropdown(choices=["xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022"], default="xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022",type="value", label="model")
|
33 |
],
|
34 |
gr.outputs.Audio(label="Output"),
|
35 |
article=article,
|