View Single Post
  #7  
Old 01-27-2016, 04:10 AM
Silvie Silvie is offline
Member
 
Join Date: Dec 2015
Posts: 7
Hi, its me again

I think I found the problem. I think it has something to do with an action I programmed bevor the avatar talks.

The avatar goes to the main view of the proband and stops 2 meters in front of him...so this is the whole code. When I comment it out, the speech works without interruption....so perhaps my code stops the speech???


def szenario(self):

#Avatar beginnt Handlung
self.female.execute (190, delay_in= 2, end =2.2)
self.female.stopCycle(275)
yield viztask.waitTime (2)

#Avatar geht auf Proband zu, bleibt 2,5 Meter vor ihm stehen
manager = vizproximity.Manager()
manager.setDebug(viz.OFF)

#Add main viewpoint as proximity target
target = vizproximity.Target(viz.MainView)
manager.addTarget(target)

sensor = vizproximity.addBoundingSphereSensor(self.female,s cale=2.0)
manager.addSensor(sensor)
run = vizact.walkTo([viz.MainView.getPosition()[0], 0, viz.MainView.getPosition()[2]], walkSpeed = 0.9, walkAnim =142, turnSpeed = 180)
self.female.addAction(run)

def EnterProximity(e):
self.female.endAction()
manager.onEnter(sensor,EnterProximity)

yield viztask.waitActionEnd (self.female, run)
yield viztask.waitTime (1)

#Sprechen
self.female.state (91)
speech = vizact.speak (self.sound_path + '1_KB.wav', threshold = .1, scale = 0.002, sync = True)
self.female.addAction (speech)
yield viztask.waitActionEnd (self.female,speech)
self.female.idlepose( -1)
Reply With Quote