tts / app.py
ronniet's picture
Create app.py
32e218a
raw
history blame
395 Bytes
import gradio as gr
from TTS.api import TTS
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False, gpu=False)
def predict(text):
file_path = "output.wav"
tts.tts_to_file(text, speaker=tts.speakers[0], language="en", file_path=file_path)
return file_path
demo = gr.Interface(
fn=predict,
input='text',
output='audio'
)
demo.launch()