Asked
— Edited
Function request.
In speech recognition, on the setup menu I would like to be able to run a script before the Speech Phrase is spoken and one after Speech Phrase is spoken.
Secondly on the same page. It would be great to have a search box to search The Phrase list that trips the script. This would make it much easer to find specific entrees.
:D
Slee, for the first request you said "In speech recognition, on the setup menu I would like to be able to run a script before the Speech Phrase is spoken and one after Speech Phrase is spoken."
Obviously after the speech phrase a script can run. But how would a script know to run before you ever speak anything? If there was a giant spider about to fall on your head to worn you I would need to speak first and say, "Giant Spider, better move!" before you react, correct?
Can I ask, what sort of script do you want to run before speech recognition? I may have an idea.
I'm having issues where the robot hearse him self talking and the responds to it while in the middle of a script. This tends to crash the computer running the ARC. I have been using the ControlCommand("Speech Recognition", PauseOff) / ON in my scripts but because EZ-Robot can run many scripts at the same time its not always effective. I have also worked wit SayEZBWait("XXXX") but that only effects the script at hand and not the others running scripts as well.
As far as how to know if a phrase is a bought to be spoken, It appears to me ( and I may be wrong) but it looks like an IF statement is used to check each Phrase then starting the a prorate script. If that's the case then the command to run a start script right before the Phrase script is triggered and then an END script right after it has been triggered.
Okay, the suggestions I was going to give you was to use a Cheat Sheet command for voice rec and SayWait that have already mentioned. The only other things I can suggest is using the "Enable Speech" phrase and "Enable Cmd" where you can add a script.
Or in the speech command scrips, add a Cheat Sheet command to pause or disable the speech commands at the top of your scripts so nothing else can be heard while the script is running until the "Enable Speech" command phrase is used again. I can't think of anything else I'm afraid.
@Slee
The best way is using the Cheat Sheet commands to pause the speech control after you say a command (beginning of your script) and when the script is finished running use another Cheat Sheet command at the end of your script to un-pause the speech control...@Slee,
Yes that is a familiar problem when the robot hears and talks to itself, there are a couple of my videos with "RedBender" where he comically does just that. My solution was just like RichardR said, script the pause and un-pause of the speech control.
@Slee The Sloth.
Yes, the use of cheat sheets to pause the speech recognition control I mentioned in post #5 is something I use in all of my speech recognition scripts as I have I countered the same problems, and it works great.
It's a good idea though about having a search box to easily look for commands, especially when you have about 400/500 of them.
I have been working with the pause and un-pause of the speech control but they do not always work. Must work on my code a bit more.