17 lines
427 B
Python
17 lines
427 B
Python
|
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()
|