Jump to content
  • 0

Interactions between voice and scripts


Syko Kamachi
 Share

You are about to reply to a thread that has been inactive for 5213 days.

Please take a moment to consider if this thread is worth bumping.

Question

I just wanted to know, what's the function or event I need to call on to have a script respond to voice in any way shape or form? The purpose is to have a mouth texture on a prim head change when the wearer speaks on voice. Normally I wouldn't touch voice in a script with a ten foot pole, but I'm getting paid for it you see

And before some wiseguy starts saying "there's no such function, scripts can't react to voice" - there is. I know there is because I've seen people wearing them. I just want to know what's that one line of code that introduces any sort of reaction to voice into the script - most likely a boolean integer - and after that I can handle it. I've been trawling numerous LSL wikis for over an hour, and the best I came across was a few prospective functions that were going to introduce a text-to-speech and speech-to-text engine.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I did a quick search for references to mouth movement in Second Life and found a page with information about turning on Lip Sync. The web page can be found at http://wiki.secondlife.com/wiki/LipSync. Hope that is of some help to you.

 

Message was edited by: Andrew HellershanksAfter posting the information above, I did some further digging in to the LSL API. I also remembered I had seen keyboards that pop out in front of an avatar when they are typing.To find out if you are typing, set a 1 second timer. In timer event handler use a call to llGetAgentInfo with your avatar key and check if the AGENT_TYPING bit is set. If the bit is set, call the routines to animate the mouth. If the mouth is part of your normal avatar, you could trigger an animation. If your avatar is wearing a prim head with a mouth, you can trigger some routine to animate the prim mouth piece of the head using Puppeteer, or some similar prim animation script. system.

Link to comment
Share on other sites

  • 0

Naahhhh, my 26-odd years professional programming experience just isn't enough to overcome only 2 years LSL scripting.  As I'd hate to be called a wiseguy - or any sort of guy for that matter - I will say nothing and look forward to sicko's Syko's explanation of how it's done.

'course, I might be tempted to slide over to the 'scripting tips' forum or maybe ask in one of the scripters' groups or mailing lists while I'm waiting.

Or I could toddle off and write some app outside SL that interfaced with my mic and sent info to SL.

Then again, I might not.  After all, no-one's paying me for something I can't do.

Link to comment
Share on other sites

  • 0

Whooooa. Chill out. No need to break out the unnecessary sarcasm, I was asking an honest question. I've seen voice activated AO's being used by people who don't know one end of a script from the other before, so I know there is an entirely in-world way of detecting voice. All I wanted to know was how to do it. Also, for someone who's allegedly been professionally programming for longer than I've been alive, poking fun at my username was a pretty childish response.

Link to comment
Share on other sites

  • 0

There are gestures that can be triggered by voices, using a special chat trigger, you can use them as a relay to a chat output your scripts can interpret. Look up voice activated gestures, it's along the lines of voicelevel1.0 or similar. They're avaliable in the Library under Gestures.

Hope I helped.

Link to comment
Share on other sites

  • 0

EDIT: Following my own advice and reading the docs - there is one exception to the "can't react to voice". The voice system does give info that voice is being used, so a simple on/off reaction is possible. If that is all that is wanted, yup, you CAN do it.

Original message:

There is no way a script can "react" to voice. I don't know what you've seen, but it was NOT a script reacting to voice.

You can either believe the wiki, the developers here, and me, or waste time trying to find something that doesn't exist.

http://wiki.secondlife.com/wiki/Voice/Technical

Also follow the links from there - you will see that the voice is carried separate from the other SL data and so CANNOT be "read".

Have fun reading.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 5213 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...