Created
September 27, 2020 12:39
-
-
Save EnkrateiaLucca/aef985a645718c16ff0da63122021740 to your computer and use it in GitHub Desktop.
Functioin to speak from a list of sentences modified to give a quick introduction
This file contains 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
def say_principles(principles): | |
speaker = pyttsx3.init() | |
voices = speaker.getProperty("voices") | |
speaker.setProperty("voice", voices[1].id) | |
speaker.say("Never forget the following principles") | |
for p in principles: | |
speaker.say(p) | |
speaker.runAndWait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment