Andy Roid
I tried to get an answer to this question in the past but I think I never clarified what I wanted to do properly. I will try to explain with a simple example.
There are 10 objects or faces programed to be recognized by a camera. (a specific variable) One face is recognized. (x variable) This opens a specific database so the speech recognition will respond to this face or object with specific replies or phrases which are stored in a folder only for this recognition (x variable). ( stored somewhere?)
The next object is seen (y variable), which opens the specific folder for this object. Appropriate responses are made.
3 Load and unload continues based on object seen ( ? variable).
I know I can tag the image to respond, ("I see a frog"), but what I want is to queue a whole folder of responses of speech recognition files determined on who or what is seen ( ? variable), and what is said to the robot ( audio in files and responses in folder (normal speech recognition)). This can also run movement or outputs etc.
Example: I sit in front of robot. I say "Hello" My robot responds to me with my name. I ask a question. the answer is appropriate for me. My wife sits in front of robot. She says "Hello" Robot responds to her with her name. Answers and responses are for her. My friend visits. He is asked about baseball.
Two or three objects or faces can be done totally with scripting, but 10 or 20 would be more difficult.
I have a Omron camera which can recognize many faces. A variable is given for each one. This can point to a folder. What I need help with is how and where to put folders of data which can be loaded into and out of the ARC. Then how they can be used for the speech recognition as needed. The folders will have a lot of data specific to that object or face.
My computer skill are minimal at best. Anyone have any advice on how to do this? ( I guess be able to move folders of data into and out of the speech recognition portion of the ARC based on specific variables.?)
I hope this is clear?
This would be dead simple to script... I really mean no offence but If you learn how to code (ez script), you would be able to do this kind of stuff for yourself... I never usually ask for help on here not because I am all that brilliant (I know squat about PC programming), but because I am very good at scripting... I came from the basic stamp micro so logic programming with ez script came naturally... I am actually not singling you out as there are a few long time members that need to take some time and learn how to script... ARC controls are awesome as we know, but they can only take you so far... Besides ez script @DJ has provided us with scratch and Blockly as well... Logic programming will get you what you want...
Start by sitting down and drawing a flow chart on what you want to do... Then look over ez script (examples are usually provided)... Start with a basic outline... IF, ELSEIF and ELSE... then fill in the details...
Sorry I realize I did help much with the actual question... But what you want to do is much easier than you think. It will just take a bit of learning first...
RR, correct. This would be a simple IF, ELSEIF and ELSE tree script. In your ez zcript you need to first declare the variable that your camera is sending (Camera_variable = $Camera_variable ) then do your IF, ELSEIF and ELSE statements.
Here's a section of a script I just picked and cut out of my project that may help you see how this works. It's totally unrelated to what you're doing but the structure is what you may be looking for:
In my above code I guess I could use an Else statement instead of a Elseif. I think you use an elseif when you are comparing two values in the same statement. An Else is used when nothing else applies to the value you're looking at. However it seems to work for me.
Remember to add sleep commands when needed to process things outside of the script to complete before the script moves on or things may not happen you need to happen.
Hope this helps.
There's a The Robot Program episode about having the robot speak what it sees, and how to have IF/ELSEIF/ELSE statements. Here is the link https://synthiam.com/Tutorials/Lesson/106
extend the IF/ELSEIF/ELSE commands for your 10 or 20 objects.
I still haven't made my self clear. I understand the scripting mentioned. We have gone thru this in the past. I have a script which does work based on IF/ELSEIF/ELSE. I guess I need to post an example script of what works then go from there.
Ahh but I do understand what you want to do... go through the ARC script commands to see how to create txt files. You can use them to store data on recognized objects. For example each object (person recognized) can have it's own file (or as you call it.. folder) that contains the relevant information on that specific object or person .... See below...
HOORAY.... I Think you got it. My biggest problem is conveying what I wanted to do. Richard, I believe you understand. I will look into the txt file info in your example. This should get me going in the right direction. THANKS
Thanks for the advice guys.
Here is what I am doing.
Antonn knows and recognizes 5 people (face recognition) from a Omron camera. I use the speech recognition and the IF/ ELSEIF/ELSE to determine what response to return. For example if Bob is seen, and Bob says Hello, Anton response to Bob with "Hello Bob, good to see you. How is your wife Jane?" The responses continue based on what is stores and flagged for the variable from the camera for Bob. When Jane is seen, and speaks, the responses return the same way, but only for Jane. Jen, Tom etc. If the face is not recognized, generic replies are made.
My goal was housekeeping. I wanted to store the responses together so I can edit more easily than I do using the IF/ELSEIF/ELSE. I also want to use the gender variable so Antonn can reply more gender correct . Jane is pretty, Bob is handsome. She wears a pretty red dress. He wears a nice blue shirt. I have over 100 responses built in so far, so I wanted to try to organize and access them easily, or easier.
This is why I asked this question. Make sense?
I will look in the ARC info on txt file creation.
@Andy, I also think text files and IF/ELSIF/ELSE logic is the way to go. I've been using and experimenting with the same method for my robots. I also have an Omron camera I want to integrate. There is a Tutorial for Text Files
Something I think that is easy to do at first is integrate a random joke teller, where you use a txt file with a listing of jokes and randomly pick one to read.
Once you get used to working with files I think you'll start to see some new uses for them.
For example I could see a text file for Male adjectives and one for Female. If Anton was to create the sentence "Bob looks handsome today." The logic flow might be something like this:
You could then have Anton read at a txt file with knowledge items for Bob where Anton might asks "How about those Atlanta Falcons?"
I'd be happy to collaborate with you Andy.
You are exactly where I want to go.... Dave Cochran was planning on making a script which would load information about a "new" person from the Omron. I have no idea how it would work. I assumed this data could be used to develope responses. Davids job and classes occupy all his time now, so wouldn't want to bother him about it. I would like to work together on this. What is the best way to contact you. Is the Gmail account in your profile best?
Yes it is.
Hi Justin,
Can't get email to go. I will try sending a message on Skype.
weyoun7ster at gmail dot com is my email, it is better than Skype to reach me
Ok I will try again tomorrow.