File size: 1,061 Bytes
a3f9613
 
 
e478b84
 
 
a3f9613
 
 
 
 
 
 
 
 
 
 
 
 
e478b84
 
a3f9613
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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