
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.
1. 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?)
2. 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 EZ Builder. 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 EZ Builder based on specific variables.?)
I hope this is clear?
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...
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:
Code:
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.
extend the IF/ELSEIF/ELSE commands for your 10 or 20 objects.
Code:
I will look into the txt file info in your example. This should get me going in the right direction. THANKS
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.
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:
1. ID the face
2. ID the gender of the face
3. Based on gender open adjectives file and select random adjective
4. Prepare greeting, standing greeting is: NAME looks ADJECTIVE today.
5. Say greeting
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.
I would like to work together on this. What is the best way to contact you.
Is the Gmail account in your profile best?
Can't get email to go. I will try sending a message on Skype.