
kamaroman68
USA
Asked
— Edited
My project is doing some very weird things with the speech recognition. If I post my project this evening would anyone mind taking a peek at it?
Thanks. Chris
Speech Recognition Control
=======================
When the control is loaded, the control initializes the speech recognition, and the speech grammar is loaded with the existent: enable phrase, disable phrase, phrase list. The pause speech checkbox is irrelevant.
The speech recognition is started and will fire a PhraseRecognized event when the SR catches a phrase.
Phrase Recognized event
====================
When you load a Speech Grammar (i.e. Phrases) you are telling the engine what you expect. Every sound, noise or phrases are matched with existent Grammar, and a confidence level is reached. If the SR has something will fire the event with a phrase and a confidence level. There are many false positives, one example "Robot bla bla" is matched with "Robot Stop" and a confidence 0.51.
How is the Phrase Recognized event handled ?
=====================================
1) Variables Confidence and Phrase (i.e. $SpeechConfidence and $SpeechPhrase) will be assigned with the Event's Confidence & Phrase values.
Note 1: Pause checkbox state is irrelevant.
Note 2: If you are monitoring the Phrase variable you should check the confidence level, otherwise a low level confidence will trigger an action.
Only one condition will be met (A or B or C or D):
A) Event.Confidence < Configuration.Confidence
Code:
B) Event.Phrase == Enable Phrase
Code:
Note: Does not matter if the Checkbox is already checked or not
C) Event.Phrase == Disable Phrase
Code:
Note: Does not matter if the Checkbox is already checked or not
D) Pause Checkbox is not checked i.e. it's not paused.
Code:
1) I agree with Richard R if you have an Enable and/or Disable Phrase will be matched to all Speech Recognition events.
Note: Remember there are a lot of false positives.
2) Pause Commands and Checkbox have the same behavior.
3) When a Say command is executed, the speech recognition engine (not the checkbox) is paused and is resumed when the speech synthesizer ends.
3) SayEZB does not pause the recognition engine, so in your case, the SayEZB can interfere with the Enable/Disable phrase.
Note: The Pause checkbox state is irrelevant
Please fix the following script errors: