jarvis/talk.py

17 lines
427 B
Python
Raw Normal View History

2023-06-12 16:06:24 +00:00
import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
# engine.setProperty('voice', voices[3].id)
# engine.say("I will speak this text")
# engine.runAndWait()
# engine = pyttsx3.init()
# voices = engine.getProperty('voices')
# print(voices)
for voice in voices:
engine.setProperty('voice', voice.id)
print(voice)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()