python - How to parse sentences, words and visemes with pyTTS -
python - How to parse sentences, words and visemes with pyTTS -
i'm trying utilize pytts
hear phrases.
i need stuff in every sentence, word , viseme of each phrase. although can hear scheme reading text, nil happens when seek create callback functions these elements.
here code:
import pytts class enginetts(object): def __init__(self): phrases = ['this first utterance!', 'now speak else', 'finally conclude phrase'] self.tts = pytts.create() self.tts.subscribeword(self.onwordsentence) self.tts.speak(phrases) def onwordsentence(self, event): # never calls this... print 'this function has been called' x = enginetts()
the same sentences , visemes. doing wrong?
because you're not calling function since has not ()
@ end. should replace:
self.tts.subscribeword(self.onwordsentence)
with:
self.tts.subscribeword(self.onwordsentence())
python
Comments
Post a Comment