We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47871bd commit 954a812Copy full SHA for 954a812
pyttsx3/events.py
@@ -0,0 +1,15 @@
1
+#This Example based on Listening for events
2
+
3
+import pyttsx3
4
+def onStart(name):
5
+ print 'starting', name
6
+def onWord(name, location, length):
7
+ print 'word', name, location, length
8
+def onEnd(name, completed):
9
+ print 'finishing', name, completed
10
+engine = pyttsx3.init()
11
+engine.connect('started-utterance', onStart)
12
+engine.connect('started-word', onWord)
13
+engine.connect('finished-utterance', onEnd)
14
+engine.say('The quick brown fox jumped over the lazy dog.')
15
+engine.runAndWait()
0 commit comments