University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Interrupt or stop ongoing speech or animation? | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Interrupt or stop ongoing speech or animation?
December 3, 2013
6:54 am
Avatar
Jun
Guest
Guests

I'm working on interaction model between a virtual human using SmartBody and a human.

 

I want to stop or interrupt ongoing speech and animations of a virtual human, but the messages were queued when I call other speech messages or animations. 

 

Can I stop both speech and animation immediately when a new message is happen?

 

Thanks.

December 3, 2013
6:54 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You can call:

 

bml.interruptCharacter("mycharacter")

 

to stop all BML actions that are associated with the character. Does this do what you need?

 

Ari

 

 

 

December 4, 2013
9:49 am
Avatar
Jun
Guest
Guests

Ari,

 

I've called interruptCharacter function, but it didnt' work in terms of speak.

Here are source code:

std::stringstream command1 ;

command1 << "bml.interruptCharacter(\"sophieGEO\") "; 

_frameListen = _m_app->getOgreFrameListener();
if(_frameListen)
{
_frameListen->_bmlCommands.push_back((char*)command1.str().c_str());

}

 

Do you how do I solve this problem?

 

Also, I found a vhmsg which may stop a playing sound.

It's name is "StopSound", but I can't use it. Thus, can you tell me call this function. Actually I'm using the cerevoicerelay and  I guess that I may use these codes about "RemoteSpeechReply"  but I don't know how to call it.

 

std::string reply = agent_name;
reply += " ";
reply += message_id;
reply += " OK: <?xml version=\"1.0\" encoding=\"UTF-8\"?>";
reply += xml;

printf( "REPLY: %s - %u\n", reply.c_str(), timeGetTime());

#ifdef _DUMP_COMM_TO_DISK
fprintf(_outfile, "%d: %s\n\n",_dumpCounter - 1,reply.c_str());
std::string dumpXMLstring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + xml;
fprintf(_outXML, "%d: %s\n\n", _dumpCounter - 1, dumpXMLstring.c_str() );
#endif
vhmsg::ttu_notify2( "RemoteSpeechReply", reply.c_str() );

 

Thanks a lot,

Jun

December 5, 2013
7:02 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

To play a sound file, SmartBody calls 'PlaySound'. To stop playing a file, it calls 'StopSound'.

 

You can call the 'StopSound' function like this:

 

vhmsg::ttu_notify1( "sbm StopSound mysound.wav");

 

the first parameter (sbm) tells SmartBody to interpret this command, then the StopSound function and the sound file to stop playing.

 

The speech relays (like the Cerevoice relays) create a .wav file from the text input, then tell SmartBody where to find the .wav file. SmartBody itself plays the sound file once communication to the speech relay has been finished. The 'RemoteSpeechReply' message that you are playing around with is only used to generate the sound file.

 

The interruptCharacter() function should stop playing the sound file automatically; if it doesn't then I need to fix that bug. The workaround is to add the StopSound command at the same time.

 

Ari

 

 

December 10, 2014
7:12 am
Avatar
Member
Members
Forum Posts: 52
Member Since:
December 9, 2014
sp_UserOfflineSmall Offline

Jun said
I'm working on interaction model between a virtual human using SmartBody and a human.

 

I want to stop or interrupt ongoing speech and animations of a virtual human, but the messages were queued when I call other speech messages or animations. 

 

Can I stop both speech and animation immediately when a new message is happen?

 

Thanks.

Jun said
I'm working on interaction model between a virtual human using SmartBody and a human.

 

I want to stop or interrupt ongoing speech and animations of a virtual human, but the messages were queued when I call other speech messages or animations. 

 

Can I stop both speech and animation immediately when a new message is happen?

 

Thanks.

I am newbie in Smartbody and i have the same project, virtual companion using voice exchange. Can you help me on this?Just an idea how to start with interacting with a virtual human and a human.

Thank you very much.

December 10, 2014
6:14 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Can you ask the question again? What kinds of problems are you having? Does the interrupt() function not work for you?

 

Ari

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 69

Members: 122211

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 531

Posts: 2495