Update app.py
Browse files
app.py
CHANGED
@@ -138,14 +138,14 @@ with gr.Blocks(css="style.css") as demo:
|
|
138 |
""")
|
139 |
|
140 |
# Use for the Selection of voice for Hermione
|
141 |
-
with gr.Row():
|
142 |
-
|
143 |
|
144 |
|
145 |
with gr.Row():
|
146 |
us_input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", waveform_options=False)
|
147 |
us_output = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
148 |
-
gr.Interface(fn=respond, inputs=[us_input, language_code], outputs=us_output, live=False)
|
149 |
|
150 |
|
151 |
with gr.Row():
|
@@ -154,7 +154,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
154 |
output_audio = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
155 |
with gr.Row():
|
156 |
translate_btn = gr.Button("Response")
|
157 |
-
translate_btn.click(fn=generate1, inputs=[user_input, language_code], outputs=output_audio, api_name="translate")
|
158 |
|
159 |
|
160 |
|
|
|
138 |
""")
|
139 |
|
140 |
# Use for the Selection of voice for Hermione
|
141 |
+
#with gr.Row():
|
142 |
+
# language_code = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione")
|
143 |
|
144 |
|
145 |
with gr.Row():
|
146 |
us_input = gr.Audio(label="Your Voice Chat", type="filepath", interactive=True, sources="microphone", waveform_options=False)
|
147 |
us_output = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
148 |
+
gr.Interface(fn=respond, inputs=[us_input, language_code = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione")], outputs=us_output, live=False)
|
149 |
|
150 |
|
151 |
with gr.Row():
|
|
|
154 |
output_audio = gr.Audio(label="Hermione", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
|
155 |
with gr.Row():
|
156 |
translate_btn = gr.Button("Response")
|
157 |
+
translate_btn.click(fn=generate1, inputs=[user_input, language_code = gr.Dropdown(choices=list(Female_language_dict.keys()), value="English (UK)-Maisie- (Female)" , label="Select Voice for Hermione")], outputs=output_audio, api_name="translate")
|
158 |
|
159 |
|
160 |
|