
Tymtravler
USA
Asked
— Edited
I have a bunch of (say) fields setup in VR. If someone just happens to say something that is close to one of my say commands JAC will shoot off his mouth. I was wondering if there is a way for me to tell the robot not say anything until I want him to. I have a HAL9000 Home Automated System that I can tell it to go to sleep("Computer Go To Sleep"). It will still listen but will not responded to any commands until I tell it to wake up("Computer Wake Up". Then it will respond to my spoken command.
In the config I believe there are two commands, one for enabled and one for disabled.
Clap on, clap off
.....but seriously Rich is correct(as usual
) Its easy to turn off using VR...but to reenable it I think you would have to use something else ..like an electret set for a LOUD sound to turn the VR back on....Not sure if you can reenable the VR with a Voice command? something easy enough to try
Yes, you can turn it on and off by voice comand. Open the SR control and look at the top of the box. You'll see the two fields you need. just type the command it will listen for in one to turn it off and in the other put the command it will listen for to turn it back on. There is even a place next to them where you can run a script when the command is heard. You can also pause the SR with a script useing the Pause(). It works great. I use it all the time. Watch one of my B9 videos I have in my project thread and youwill see and hear me useing it.
What are all the commands for speech recognition?
Whatever you want them to be
To reduce errors in recognition I suggest you use longer clearer phrases rather than shorter individual words.
"please turn on the Lights" rather than just "Lights"
You can also make some commands into toggles rather than have two separate commands.
Eg. One command saying "Computer lights please" instead of having two separate commands "Turn the lights on" and "Turn the lights off".
Your program would look something like:
#Define Variables $Lights=""
Toggle the lights
if ($Lights="Off" ) $Lights=("On" ) $Phrase=("Lights activated" ) elseif ($Lights="On" ) $Lights=("Off" ) $Phrase=("Lights de-activated" ) endif cc("Speech Recognition", PauseMS, 3000) Say ("$Phrase" )
Notice I also pause the recognition while speaking...seems to reduce errors. I sometimes also use saywait("Lights de-activated") to prevent anything else happening until the statement has been spoken.
@Tameion
@Tameion-So if I understand this correctly, by using the say command for say("computer turn on the lights please") as soon as I say "computer" the system is already processing the VR command. By using the (saywait) command the computer must hear the complete request before it will respond.
@dschulpius-Great thanks, can you send me a link to the video you are talking about.