tfg-demo / app.py
daniel-dona's picture
Update app.py
3dd4456
raw
history blame
689 Bytes
import gradio as gr
from TTS.config import load_config
from TTS.utils.manage import ModelManager
from TTS.utils.synthesizer import Synthesizer
model_path = "./model/model.pht"
config_path = "./model/config.json"
synthesizer = Synthesizer(
tts_checkpoint=model_path,
tts_config_path=config_path,
tts_speakers_file=None,
tts_languages_file=None,
vocoder_checkpoint=None,
vocoder_config=None,
encoder_checkpoint="",
encoder_config="",
use_cuda=False,
)
def run_tts(text):
wav = synthesizer.tts(text)
return wav
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="audio")
iface.launch()