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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -