petro-tts-app / app.py
jhonparra18's picture
Update app.py
8613d28
raw
history blame
823 Bytes
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")
reduce_noise=gr.Checkbox(label="Reduce Noise", info="Use Noise Reduce after model generation?")
text_button = gr.Button("Generate")
text_button.click(text_to_speech, inputs=[text_input,reduce_noise], outputs=gr.Audio(label="Model Response"))
logger.info("prompt: ",text_button)
demo.launch()