Text-to-voice / app.py
lodhrangpt's picture
Update app.py
e478b84 verified
raw
history blame
1.06 kB
async def create_demo():
voices = await get_voices()
# Remove the description or replace it with a custom message
description = "" # Set to an empty string if you don't want any description
demo = gr.Interface(
fn=tts_interface,
inputs=[
gr.Textbox(label="Input Text", lines=5),
gr.Dropdown(choices=[""] + list(voices.keys()), label="Select Voice", value=""),
gr.Slider(minimum=-50, maximum=50, value=0, label="Speech Rate Adjustment (%)", step=1),
gr.Slider(minimum=-20, maximum=20, value=0, label="Pitch Adjustment (Hz)", step=1)
],
outputs=[
gr.Audio(label="Generated Audio", type="filepath"),
gr.Markdown(label="Warning", visible=False)
],
title="Edge TTS Text-to-Speech",
description=description, # Updated to remove unwanted content
article="Experience the power of Edge TTS for text-to-speech conversion!",
analytics_enabled=False,
allow_flagging="manual"
)
return demo