Mouth Control with MarySpeech

I am using the following:

i01 = Runtime.createAndStart("i01", "InMoov")
i01.mouth = Runtime.createAndStart("i01.mouth", "MarySpeech")
i01.mouth.setVoice("dfki-obadiah-hsmm")
i01.ear = Runtime.createAndStart("i01.ear", "WebkitSpeechRecognition")
htmlfilter = Runtime.createAndStart("htmlfilter", "HtmlFilter")
sonny = Runtime.createAndStart("sonny","ProgramAB")
sonny.startSession("ProgramAB","inmoovWebKit")
i01.startMouthControl("COM3")
  
 
i01.mouthControl.jaw.setMinMax(120,180)
i01.mouthControl.jaw.map(0,180,180,120)
i01.mouthControl.jaw.setRest(180)
i01.mouthControl.setmouth(0,180)
i01.mouthControl.setMouth(i01.mouth)
 
 
# add a link between the webkit speech to publish to ProgramAB
i01.ear.addTextListener(sonny)
# Add route from Program AB to html filter
sonny.addTextListener(htmlfilter)
# Add route from html filter to mouth
htmlfilter.addTextListener(i01.mouth)
 
When i type a question into sonny(ProgramAB), I get the answer right away and the mouth servo starts to move to speak the text. However, I dont hear the text until moments later. 
 
Is there a way to pospone the mouthcontrol function until the text is ready to be heard? 
GroG's picture

Hello and Welcome TDP378, Yes

Hello and Welcome TDP378,

Yes as you have found out MouthControl works on the text event.
We have been looking into a service which willl publish line data - this is the data coming from the audio output line. But it has not been done yet.

There's a big list of things to do :)