Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyttsx3 interrupting an utterance

import pyttsx3
def onWord(name, location, length):
   print 'word', name, location, length
   if location > 10:
      engine.stop()
engine = pyttsx3.init()
engine.connect('started-word', onWord)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()
Source by pyttsx3.readthedocs.io #
 
PREVIOUS NEXT
Tagged: #interrupting #utterance
ADD COMMENT
Topic
Name
9+7 =