If I use a say command in a script, the speech recognition control stops recognizing anything. Once the say command completes, the speech recognition control starts picking up recognizing what is said again. I don't think that this used to work this way but maybe it did. I used to pause the speech recognition when using the say command when needed, but it looks like this is now a built in "feature". Unfortunately it causes someone not to be able to cancel the speech that is being said by the say command through SpeakStop( ) without using a keyboard or mouse or some other input or sensor. You can't say "Cancel" for example while a long say statement is running.
DJ, am I missing something or is this intended?
Here is an example...
Script named something like "SayAIResponse"
say( "This is a long sentence that goes on and on. It might be the news or weather or an RSS feed of some sort. While I am saying this, the speech recognition control will not pickup anything that I say. This is a bit confusing as the speech recognition control is a dictionary based speech recognition system that only understands certain phrases defined by the user.")
While this is running try to say something that the speech recognition control would normally pickup like maybe the word "Cancel" which would stop the script that is saying the text above with the below script.
SpeakStop( )
Basically, I am looking for a way to use the SpeakStop() command from the speech recognition control (obviously through spoken words) while something is being said by the say command.
Thanks David
Its always been that way - otherwise the speech recognition picks up what it is saying
we can program around this in the plugin. we will simply catch a set of phrases supplied by the user and build a dictionary of phases to use to call a script that stops the say command, which then enables the speech recognition in ARC again. It will be up to the user to decide how they want to talk to their robot at that point.
I found a thread from 3 years ago where the change was made. someone said "Turn out the lights" and the robot would reply "turning out the lights" which caused the speech recognition to then hear "turn out the lights" and the vicious loop began.
I understand why it is like this. just wonder why I was manually trying to do this previously...
no problem. we have a solution to the issue.
and the good news is that this is the last thing that we know of before the EZ-AI client plugin is ready for my extensive testing happens and I approve it to be tested more thoroughly by others..
we are at the nitpick stage where everything in the user experience is picked apart and fine tuned.
Adding the phrase as an exception didn't work either - it's something i tried. It doesn't detect the phrase it is saying, it detects only words that it is saying.
For example, you ask it the weather or news headlines... and suddenly your robot is moving forward and dancing. Because certain sounds are picked up and recognized as false positives.
interesting. if it doesn't work out, we will just have to have things like the news complete prior to the user being able to continue. no big deal as we already break this up into batches, and the user says "next" to hear the next batch of headlines. the user can then say something like "tell me the one about Donald Trump" and it will read the article about Donald Trump.
we also use short answers to questions asked to prevent huge amounts of data from being returned when natural language is more like short answers instead of long Wikipedia articles.
if we can't make it work, it's just a bit of a nuecence instead of a show stopper.
You could just have one keyword that is the only keyword active during speech. Such as "Stop Talking" or "Execute Me Robot". Or some phrase that shouldn't be easily fooled
yea, this is the plan. I think giving a few choices that the user can enter will work. some people will want to "shut up" and others will want to say something like "excuse me". we are all about trying to make it as customizable as possible while still working.
DJ,
on a side note, using speakstop () when using saywait() causes the speech recognition control to stop working.
getting the error for you shortly. looks like it's an issue with stopping an asynchronous commans.
Here is the exception:
Here is the code with sayWait:
Here is the code with speakStop:
Let me know if there is anything you see we are doing wrong or if you want us to do something different.
Thanks David