Created
December 14, 2020 09:18
-
-
Save Abhayparashar31/aedc88b42d469ef2195bbf308be4e59a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyttsx3 | |
| engine = pyttsx3.init('sapi5') | |
| voices = engine.getProperty('voices') | |
| engine.setProperty('voice', voices[0].id) | |
| def speak(audio): | |
| engine.say(audio) | |
| engine.runAndWait() | |
| ## speak("Don't Buy Alexa! Build Your Own Using Python") ## uncomment this to test the function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment