HirCoir commited on
Commit
edd9b02
1 Parent(s): 849c9bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -32,7 +32,7 @@ def convert_text_to_speech(parrafo, model):
32
  random_name = ''.join(random.choices(string.ascii_letters + string.digits, k=8)) + '.wav'
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.exe')
37
 
38
  # Verificar si la ruta es válida
@@ -55,10 +55,7 @@ def play_audio(parrafo, model):
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",
60
- "es_MX-cortanav3-high.onnx"
61
- ] # Agrega aquí más modelos si es necesario
62
  select_model = gr.Dropdown(model_options, label="Selecciona el modelo")
63
 
64
  gr.Interface(play_audio, inputs=[input_text, select_model], outputs=gr.Audio(), flagging_options=None).launch()
 
32
  random_name = ''.join(random.choices(string.ascii_letters + string.digits, k=8)) + '.wav'
33
  output_file = os.path.join('.', random_name)
34
 
35
+ # Construir la ruta al archivo piper
36
  piper_exe = os.path.join(bundle_dir, 'piper.exe')
37
 
38
  # Verificar si la ruta es válida
 
55
 
56
  # Crear la interfaz de Gradio
57
  input_text = gr.Textbox(label="Introduce el texto")
58
+ model_options = ["es_MX-cortanav3-high.onnx"] # Agrega aquí más modelos si es necesario
 
 
 
59
  select_model = gr.Dropdown(model_options, label="Selecciona el modelo")
60
 
61
  gr.Interface(play_audio, inputs=[input_text, select_model], outputs=gr.Audio(), flagging_options=None).launch()