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"Code:
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.Code:
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
Asked
— Edited
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.
we are at the nitpick stage where everything in the user experience is picked apart and fine tuned.
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.
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.
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.
Code:
Here is the code with sayWait:
Code:
Here is the code with speakStop:
Code:
Let me know if there is anything you see we are doing wrong or if you want us to do something different.
Thanks
David