open-notebook / tts_engine.py
avinash
updated ui2
e792350
raw
history blame contribute delete
207 Bytes
from TTS.api import TTS
tts = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC", gpu=False)
def generate_voice(text, path="podcast.wav"):
tts.tts_to_file(text=text, file_path=path)
return path