File size: 803 Bytes
4d7193b
633b833
4b9d080
4d7193b
 
 
4b9d080
4d7193b
4b9d080
4d7193b
62da8cb
4d7193b
633b833
4d7193b
633b833
4d7193b
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import os

def inference(text):
    os.system("paddlespeech tts --input '"+text+"' --output output.wav")
    return  "output.wav"

title = "Algmon Speech TTS"

description = "Gradio demo for Algmon Speech: A Speech Toolkit based on PaddlePaddle for TTS. To use it, simply add your text, or click one of the          examples to load them. Read more at the links below."

article = "<p style='text-align: center'><a href='' target='_blank'>Git Repo</a></p>"

examples=[['你好,欢迎使用Algmon语音合成']]

gr.Interface(
    inference,
    gr.inputs.Textbox(label="input text",lines=10),
    gr.outputs.Audio(type="file", label="Output"),
    title=title,
    description=description,
    article=article,
    enable_queue=True,
    examples=examples
    ).launch(debug=True)