mrolando commited on
Commit
1971328
1 Parent(s): 0928fbf

added choose lenguages

Browse files
Files changed (3) hide show
  1. __pycache__/tts.cpython-311.pyc +0 -0
  2. app.py +2 -1
  3. tts.py +2 -2
__pycache__/tts.cpython-311.pyc CHANGED
Binary files a/__pycache__/tts.cpython-311.pyc and b/__pycache__/tts.cpython-311.pyc differ
 
app.py CHANGED
@@ -28,6 +28,7 @@ with gr.Blocks() as demo:
28
  """.format(encoded_image))
29
  with gr.Row():
30
  with gr.Column():
 
31
  textbox = gr.Textbox(label="Ingrese texto")
32
  slider = gr.Slider(minimum=0.1, maximum=4.0, value=1.0, step=0.1, label="Velocidad de voz")
33
  button = gr.Button("Hablar")
@@ -36,5 +37,5 @@ with gr.Blocks() as demo:
36
 
37
 
38
 
39
- button.click(synthesize,[textbox,slider],audio_output)
40
  demo.launch()
 
28
  """.format(encoded_image))
29
  with gr.Row():
30
  with gr.Column():
31
+ leng = gr.Radio(choices=["spa","eng"], value="spa",label="Seleccioná un idioma entre Inglés (eng) y Español (spa)")
32
  textbox = gr.Textbox(label="Ingrese texto")
33
  slider = gr.Slider(minimum=0.1, maximum=4.0, value=1.0, step=0.1, label="Velocidad de voz")
34
  button = gr.Button("Hablar")
 
37
 
38
 
39
 
40
+ button.click(synthesize,[textbox,slider,leng],audio_output)
41
  demo.launch()
tts.py CHANGED
@@ -86,8 +86,8 @@ class TextMapper(object):
86
  return text
87
 
88
 
89
- def synthesize(text,speed):
90
- lang = "spa"
91
  #speed =1
92
  if speed is None:
93
  speed = 1.0
 
86
  return text
87
 
88
 
89
+ def synthesize(text,speed,lang):
90
+ #lang = "spa"
91
  #speed =1
92
  if speed is None:
93
  speed = 1.0