import torch from TTS.api import TTS print(TTS().list_models()) # Init TTS tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to('cpu') def speak(text): tts.tts_to_file(text=text, speaker_wav="speech.wav", language="en", file_path="output.wav")