Hello Im have many scripts in mind but ARC only allows 1 speech recognition control
It would be vary handy if we could use many speech recognition controls that we could rename
That way we can have sets of speech commands that can be turned on and off when needed
I know there is the SayWait command but that is vary limited as to what it can do plus it is on a timer and pups um a list on the screen that is not wanted a lot of the time
With being able to have many speech recognition controls we could create much better AI scripts with ALOT less coding and way less work arounds that in many cases just will not work
I can scripts with groups of commands in mind but that takes a lot of extra coding and many times when adding new commands I would need to go back and add more lines of code to other commands
I have been thinking about this for over 2 weeks now trying to think of ways to get around it but the best and most simple way would be to have it so we can have many speech recognition controls in the projects
Upgrade to ARC Pro
Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!
Script 1, to enable the group "daytime"...
Script within the "daytime" group
The voice command script in the "daytime" group will only run if $daytime = 1
If it doesn't then it wont run.
Use whatever you like to set the group to on or off... for instance
Or even a simple
set to voice commands.
Sure, DJ could probably add in groups to the existing voice command control however in the mean time there are always ways around it, you just need to think a little
but every time I add a new command that is the same as another that does a different thing I will have to go and add more lines of code to other commands
I tend to think a lot and I mean a lot lol
I always try to think of every thing that can make a script work and what will stop them from working and what can cause problems down the road
If we could use more than 1 speech recognition control at a time it would save ALOT of scripting ALOT of headaches and make AI scripts ALOT more dynamic
It should not take much at all to get ARC to allow more than 1 speech recognition control as most of the code for it is already there just need to set it to allow more than 1 at a time and to have it so we can rename them
2 lines of code, one at the top of the script and one at the end is not a lot of extra coding, this is all that is needed in anything which requires enabling by anything.
I cannot see how adding in 2 lines of code, right at the top and at the bottom of any script is a lot of code, headaches and everything else you claimed it to be. It's 2 lines of code in 2 of the easiest places to find in any existing script.
Taking up additional screen real estate and more than likely more processing resources is not the best option in many cases. Generally, where DJ has limited the controls to only one of that type there is a reason. A solution is to script the 2 lines of code I mentioned.
Grouping is not limited to voice commands, I use a lot of grouping for many different controls. Therefore to add it to one control, while a solution, may not be the best solution.
If you're unwilling to accept help when given it or unable to see solutions offered with an open mind when they don't fall exactly on your idea I will have to fall back on my previous statement made to you in a different topic and am unable to offer my time to you.
the more commands I add the more lines I have to add to older commands and the more complex a script gets the more that needs to be added to other commands
Im not dealing with simple little scripts im dealing with big mager scripts that just 2 extra lines will not do the job
Why is it every time I make a suggestion that will make ARC better and a lot easier to use it causes a big problem
I give up
i will never make another suggestion again
As for more than one speech recognition - it's impossible. The windows API and ARC design doesn't allow it. Im unable to type on my phone the technical reasons why right now.
I would recommend using the AI module we have, or writing scripts
Sorry to break the bad news
I understand exactly what you are saying, you want groups of commands that can be enabled or disabled. What I don't understand is how your proposed extra voice controls will make current scripts any easier to have such a control over. If my suggestion wont work your suggestion, or at least how you think it may work doesn't make sense.
I don't want to discourage anyone from asking questions or posting ideas however when I take the time to provide a working example of a solution that's instantly dismissed because it's not exactly what's been requested that's how a problem is caused. We had a very similar situation in a few other topics recently (email and controlling a switch to name two from the top of my head).
If you don't believe the solutions I have posted would work at least provide details of any errors in them which you have encountered. However if you're unwilling to try solutions I have provided or unwilling to provide detailed responses relating to errors or problems implementing them then I am wasting my time which is something I would rather not do, if that's going to be the case tell me and I will leave it for others to attend to.
I'm still really learning script structure and how and when to set up and use scripts. Up to this point I've been writing simple scripts that either turn on and off a few things and move motors to points. Some of them even have IF, ElseIf and EndIf statements, loops and such. Sometimes I struggle to even understand the logic within these simple scripts. I'm very curious about what the "Grouping" of scripts is all about Rich and Wolfie are trying to discuss. This is the first time I've heard of this. Is there an simple way to explain this concept? Heck, Maybe I'm already doing it and don't even know it.
Thanks @Wolfie for bringing this up as it's opened up a new way for me of looking at how to write scripts and structure my project.
Just be aware, when you ask for a new feature, there are creative minds here who will try to figure out how to deliver the same functionality with existing features and interfaces. Doesn't mean the feature won't be developed, but if you give the suggestions a fair shot, you may have the function you need sooner.
I use the method explained in my first post in this topic to basically enable or disable scripts for a few things. For instance, I have a "wake up" script which has Melvin tell me to wake up, reports the time, the weather and my agenda for the day. Which is great on Monday to Friday but weekends I like to sleep in.
While I could have done it a different way I have a few other scripts I don't want to be run during the week days either. So, to stop all of these scripts in the "weekday" group I simply added in the variable $WeekdayMode, have a script running constantly which sets the variable to a 1 or a 0 depending on the day of the week...
This checks the day using the variable $dayName (which gets the current day name based on the PC clock) sets the variable $WeekdayMode to a 1 or a 0, waits until the variable $dayName changes then loops around.
In any script which I don't want run at weekends or only want run during the week I use the IF statement to check the status of the group. If the IF statement returns true (i.e. if it was run now and the statement asked if $WeekdayMode was 0) then the script runs. If it returns false it jumps to the EndIf.
The IF statement is at the top of the script, it's the very first line. The EndIf is the very last line.
A similar example Melvin has is to do with his moods. For varying reasons his mood can change, this is set by a variable which is set to either "happy", "sad", "bored", "tired" and "angry" amongst others.
I have voice commands that have him tell me a joke, tell me a bit of trivia, roam the house freely, dance, follow me, look for me etc. but to make him seem more lifelike he will only do these things if he is happy or bored. If he is sad, tired or angry he will refuse to do them.
This is done the same way. A simple IF statement at the very top of the script;
Then the script to do whatever the function is, i.e. get the joke and speak it. and then the
right at the very end of the script.
However in this example I also use ELSE. When he isn't happy or bored I wanted him to give me attitude. So I added in the Else right at the end of the script;
By using the IF statement as the first line in the script you can choose to either have the script run or have the script skipped.
Wolfy's idea to have multiple voice command controls so you can pause/unpause them yet still have other voice commands work could be as simple as having group variables i.e.
To enable or disable them set to 0 or 1 as above.
In each script in the voice command control add in the IF at the top and the EndIf at the bottom.
This would also allow for scripts to become members of multiple groups, i.e.
This would have the script run if either group 1 or group 2 was enabled. Using AND rather than OR could even have specific scripts or voice commands work only if a combination of groups was enabled.
The groups would be easy to turn on or off with simple scripts which run;
And those commands could even be used in other scripts so a script can enable/disable a specific group or groups.
Hopefully that makes sense and clarifies what "groups" are. If not I will knock up an Example Project tomorrow to demonstrate what it does and how simple it is to implement.
I pause the voice recognition or even turn it on and off all the time within scripts I'm running after I send a vouce command. I do this when I don't want it to pick up any audio and react when that file is playing. Sure, I have to add the on, off or pause (ms) commands but I thought that's the way it is.