File size: 704 Bytes
53b42ec
 
 
01b0e2e
 
 
53b42ec
 
cee1344
 
53b42ec
 
cee1344
53b42ec
 
 
 
01b0e2e
53b42ec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

import gradio as gr
from inference import text_to_speech
import logging
logger=logging.getLogger("app")
logger.setLevel(logging.INFO)

with gr.Blocks() as demo:
    gr.Markdown("""# Text-to-Speech Gustavo Petro
                Fine-tuned [VITS](https://github.com/statscol/tts-ai-public-figure)""")
   
    with gr.Row():
        text_input = gr.Textbox(label="Input Text",value="Hola soy Gustavo Petro y esta es mi voz de prueba",lines=1, placeholder="Hola soy Gustavo Petro y esta es mi voz de prueba")
    
    text_button = gr.Button("Generate")

    text_button.click(text_to_speech, inputs=text_input, outputs=gr.Audio(label="Model Response"))
    logger.info("prompt: ",text_button)
demo.launch()