WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-15-2008, 01:51 PM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
Viz speech cutting off early

Hello,
I am having a problem with a vizact.speak - initally, we called the speech in question in the following fashion:
def speechsample():

action = vizact.speak(audiofile, threshold = self.sp_thresh,
scale = self.sp_scale, sync = self.sp_sync, morph = 'business02_f_highpoly_talk.CMF' )
female.add(action)
However, from time to time, the speech would get cut off (in this case, 'please continue' was clipped to 'please cont'). So, thinking that perhaps the speech was being interrupted from a delay caused by loading the .wav file immediately before using it, we changed to the following code:
At startup, we run
action = vizact.speak(audiofile, threshold = self.sp_thresh,
scale = self.sp_scale, sync = self.sp_sync, morph = 'business02_f_highpoly_talk.CMF' )
Then later, we use
def speechsample():
female.add(action)
Any idea what is going on?

Thanks,
Christian
Reply With Quote
  #2  
Old 07-16-2008, 03:28 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I'm not sure what is causing this, but a solution could be to add a second of silence to the end of the audio file. This might give it enough time to play the speech all the way through.
Reply With Quote
  #3  
Old 07-24-2008, 11:42 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
That was actually the solution we ended up using. It appeared to work nicely.

Thanks,
Christian
Reply With Quote
  #4  
Old 01-26-2016, 06:22 AM
Silvie Silvie is offline
Member
 
Join Date: Dec 2015
Posts: 7
Hi,

I have the same problem. But the speak sometimes cuts of in the middle of the text and not at the end. And sometimes the speak doesn 't start...

I don't know where the problem is....

this is my script:

def szenario(self):

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


Can anybody help me please?

Silvie
Reply With Quote
  #5  
Old 01-26-2016, 09:44 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
Is the result any different if you run the code outside of a task function? For example something like the following:

Code:
import viz
import vizact
viz.go()

female = viz.addAvatar('vcc_female.cfg',pos=[0,0,2])
speech = vizact.speak ('Situation_6_EB_Svenja_bearbeitet.wav', threshold = .1, scale = 0.002, sync = True)

vizact.onkeydown(' ',female.addAction,speech)
Reply With Quote
  #6  
Old 01-27-2016, 03:31 AM
Silvie Silvie is offline
Member
 
Join Date: Dec 2015
Posts: 7
Hi Jeff,

yes, outside the task it works. So, I donīt understand why? Is is a yield problem?
Reply With Quote
  #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
  #8  
Old 01-27-2016, 04:41 AM
Silvie Silvie is offline
Member
 
Join Date: Dec 2015
Posts: 7
I figuered it out!!!!

I had to remove the sensor after the avatar stops to walk....because when not I also stop the speech when I enter the sensor again (and this often happens)....
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Avatar finish speech ? djdesmangles Vizard 2 02-15-2008 06:56 AM
delays with <avatar>.act and speech vsully Vizard 15 08-23-2007 04:24 PM
Speech during actions zoltantoth Vizard 2 05-02-2007 03:11 PM
Speech Recognition Johannes Vizard 1 05-16-2005 10:46 AM


All times are GMT -7. The time now is 01:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC