2022-10-14 23:23:37 +05:30

10 lines
343 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import pyttsx3
questiontext= "Did you know?"
answertext= "Australia is wider than the moon. The moon sits at 3400km in diameter, while Australias diameter from east to west is almost 4000km."
engine = pyttsx3.init()
engine.save_to_file(questiontext, 'test1.mp3')
engine.save_to_file(answertext, 'test2.mp3' )
engine.runAndWait()