Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Created May 25, 2021 12:32
Show Gist options
  • Select an option

  • Save KaushikShresth07/bf4e58f9fc5a3b1c3d3340e54ef6a6d2 to your computer and use it in GitHub Desktop.

Select an option

Save KaushikShresth07/bf4e58f9fc5a3b1c3d3340e54ef6a6d2 to your computer and use it in GitHub Desktop.
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voices',voices[2].id)
def Speak(audio):
print(" ")
print(f": {audio}")
engine.say(audio)
engine.runAndWait()
print(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment