Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def convert_text_to_speech(parrafo, model):
|
|
33 |
output_file = os.path.join('.', random_name)
|
34 |
|
35 |
# Construir la ruta al archivo piper.exe
|
36 |
-
piper_exe = os.path.join(bundle_dir, 'piper
|
37 |
|
38 |
# Verificar si la ruta es válida
|
39 |
if os.path.isfile(piper_exe):
|
@@ -53,7 +53,7 @@ def play_audio(parrafo, model):
|
|
53 |
audio_content = audio_file.read()
|
54 |
return audio_content
|
55 |
|
56 |
-
# Crear la interfaz de Gradio
|
57 |
input_text = gr.Textbox(label="Introduce el texto")
|
58 |
model_options = [
|
59 |
"es_MX-locutor-voice-11400-epoch-high.onnx",
|
@@ -63,4 +63,4 @@ model_options = [
|
|
63 |
] # Agrega aquí más modelos si es necesario
|
64 |
select_model = gr.Dropdown(model_options, label="Selecciona el modelo")
|
65 |
|
66 |
-
gr.Interface(play_audio, inputs=[input_text, select_model], outputs=gr.Audio(), flagging_options=None).launch(
|
|
|
33 |
output_file = os.path.join('.', random_name)
|
34 |
|
35 |
# Construir la ruta al archivo piper.exe
|
36 |
+
piper_exe = os.path.join(bundle_dir, 'piper')
|
37 |
|
38 |
# Verificar si la ruta es válida
|
39 |
if os.path.isfile(piper_exe):
|
|
|
53 |
audio_content = audio_file.read()
|
54 |
return audio_content
|
55 |
|
56 |
+
# Crear la interfaz de Gradio
|
57 |
input_text = gr.Textbox(label="Introduce el texto")
|
58 |
model_options = [
|
59 |
"es_MX-locutor-voice-11400-epoch-high.onnx",
|
|
|
63 |
] # Agrega aquí más modelos si es necesario
|
64 |
select_model = gr.Dropdown(model_options, label="Selecciona el modelo")
|
65 |
|
66 |
+
gr.Interface(play_audio, inputs=[input_text, select_model], outputs=gr.Audio(), flagging_options=None).launch()
|