Skip to content

Instantly share code, notes, and snippets.

@EnkrateiaLucca
Created September 27, 2020 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EnkrateiaLucca/aef985a645718c16ff0da63122021740 to your computer and use it in GitHub Desktop.
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
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