In another topic an idea was mentioned for a user to speak to the robot, the text sent to Chatterbot and the response sent back... So I took it upon myself to make such a script...
The first problem is chatterbot itself, there is no user control and for the advanced features you need to pay. Budget is a huge thing to me so paying for anything I don't already have is a big no no.
But, I had used Pandoras Bot in the past and it offers everything needed for free. It's really intelligent in how it works and very trainable either online through the control panel or by just talking to the robot.
i.e. if you start talking you can say "my name is Rich" and it will remember your name. Or the same for age, favourite things etc.
Anyway, it's more of a project/work in progress than a script at this point but not something for the showcase so something for the scripting section.
So far, there are problems to overcome.
- Pandora Bot's API uses XML, EZ-Script can't parse it correctly. In this case all it just needs to set $response to be whatever is between the and xml tags.
- WaitForSpeech needs a phrase list and (unless I missed it) can't wait for dictation.
A little bit of playing around and I've managed to write (well, modify) a PHP parser for the API and can use HTTPGet to send the user speech to the API and save the response as a variable to be spoken by EZ-Script.
Currently testing with a small phrase list of; Hello Who are you What is your name How old are you
The script is sending off the recognised phrases ($input) and the parser is working, sending the response back and keeping it in variable ($response)
The script then says the text with Say($response) and the robot speaks.
Now come a few new issues... 3) The WaitForSpeech is picking up the robot speaking 4) WaitForSpeech is waiting for the phrase to finish and match, if it doesn't it times out. It seems to always want to include the part the robot said (or acts that way), for instance if it responds to "hello" with "hi there" it will hear itself, if then you say "how old are you" it thinks you have said "hi there how old are you" and doesn't match so times out.
I've avoided the timeout by setting it short and looping but this means the user has only a couple of seconds to say what they want to say or it'll restart. If I don't loop it around it takes "timeout" as the phrase and the robot responds to that.
What I need to find out is if EZ-Script can be set to wait until speech finished, rather than putting a Sleep(2000) to wait a couple of seconds.
Also, is it possible to use SAPI's dictation mode to set a variable as anything heard not just from a set list of phrases?
And, if it's possible to reset the waitforspeech after say a second of silence, rather than timeout and restart even if it is "hearing" something.
Also, can an XML parser be added like the RSS one? It's extremely similar in construction so sounds simple but without knowing how the RSS one works in ARC I really have no clue.
I guess those last few questions are really aimed at @DJ
This may all come to nothing and be one of those many failed projects I've started, it may be something that just isn't really possible with the software but it could be an awesome addition to the AI... whatever it is, it's going to be fun
I agree completely, my system has had over 12 months of constant learning through voxcommando (controls media playback with voice, plus a lot more) and it gets around 45-50% success in dictation mode, 95% with the fixed phrase list.
A word by word WaitForSpeech would be the only way for it to be accurate enough for me to see it worth using, then you loose a lot of the features that I expect people would want i.e. Asking "Who is Charlie Sheen?" his name isn't in the dictionary so the bot can't understand it.
I suspected it would become a failed idea, I'm starting to realise I was right all along. But I still win, I got to read all 14 pages of the EZ-Script manual thanks to looking for the SayWait command
P.S. if anyone want's to see how horrible dictation to a chatbot is download voxcommando trial, add the pandora bot plugin and set it up then ask "Who is Steven Seagal?" The answer I got back was rather peculiar but it did think I asked who was eating sea gulls.
Oddly enough, the answer to both questions is the same.
@RichMR2, the 50% success of dictation mode is very very poor and unusable. 95% with fixed phrase is great. However, phrases and "words" are different. For example, a WaitForSpeech would require 2 second pause between words. How the speech API works to detect phrases needs a pause between phrase. So even if a phrase contains a word, it still needs a 2 second pause.
You can change the length of the pause, but that causes a whole new pile of issues
From what I understand, your goal is to speak to your computer? Can you give me an example of a conversation you would like to have...
The original idea was not mine, it was asked elsewhere if a chatbot could be used. I think the original idea was someone wanted their robot to respond with a wider range of responses to a bigger range of questions asked by their friends. So the conversation could be pretty much anything from asking how the robot is, or what it's been doing to asking it to tell you a story, sing a song...
It was at the time I was looking for "things" I could use EZ-Script to do as I learn from doing not by reading. I already knew about Pandora Bots' AI which could be used and customised for each robot giving it it's own personality, memory etc.
@DJ I agree, something that only works half of the time is very poor. Personally (and my standards may be very high but being a perfectionist I'm allowed high standards) I wouldn't accept anything less than 90% for dictation and even then I wouldn't be completely happy. The 95% for fixed phrase barely cuts it with me but that 5% miss I put down to my current mic being a kinect mic array fixed to the wall above the TV some 3 or 4 meters from where I am when speaking and the phrases used being very similar in some cases (it's temporary until I find a decent mic solution)
I can think of a bunch of ideas that may "work" to get dictation sent to the chatbot and the reply back but thinking about it and seeing the issues that would be there and the inaccuracy this idea is being marked down as one which failed (although happy to share ideas and even what little code I have with anyone who does want to try and implement it in to their bot).
@richmr2, I think i have a really interesting solution for you
Give me some time to work on a prototype
Sounds interesting....
I wonder what DJ has in mind.
DJ's on the job. Que super hero flourish.