import pyttsx3 engine = pyttsx3.init() engine.save_to_file('Hello World' , 'test.mp3') engine.runAndWait()