Share via


Command/Exception History

  Microsoft Speech Technologies Homepage

Command/Exception History uses RunSpeech to store recognition exceptions or values of Command.Type that have occurred while processing an active QA control. When the activation of a QA control is complete, RunSpeech adds the Command/Exception data from that activation to the end of the array. If the same QA is then reactivated, the array makes the data available from the previous activation. If a different QA is activated, the array is cleared.

lastCommand = RunSpeech.ActiveQA.History[RunSpeech.ActiveQA.History.length - 1];

RunSpeech calls the ClientActivationFunction property of a QA before the QA is activated, so the Command/Exception History passed to ClientActivationFunction may contain the history of the previously-activated QA control. RunSpeech calls the other QA script functions after the QA has been activated. These functions receive non-empty values in Command/Exception History only when their parent QA or validator control has been consecutively activated more than once.

For example, when RunSpeech handles two QA controls, the Command/Exception History changes as follows:

  1. QA1 completes.
  2. RunSpeech updates RunSpeech.ActiveQA.History with QA1 data.
  3. RunSpeech checks QA1 for activation and determines that it should not be activated.
  4. RunSpeech calls QA2.ClientActivationFunction. RunSpeech.ActiveQA.History contains QA1 data.
  5. QA2.ClientActivationFunction returns True.
  6. RunSpeech sets RunSpeech.ActiveQA to QA2, and clears RunSpeech.ActiveQA.History.

If RunSpeech processes the Answers, ExtraAnswers and Confirms collections of the active QA without successful recognition of at least one Answer, a value of NoReco is inserted into the array. Additional Command/Exception History values are:

Platform event Command/Exception value
Command is activated Command.Type
Prompt raises an onerror event PromptError
Reco raises an onerror event RecoError
Dtmf raises an onerror event DtmfError
Reco raises an onnoreco event NoReco
Reco raises a silence event
(Normal confirmation)
Silence (see note 1.)
Reco raises a silence event
(Short time-out confirmation)
ShortTimeoutConfirmation (see note 2.)
Transition to new QA History is cleared

Note 1 In the explicit confirmation mode, the user must speak in order to confirm important elements of data that have been collected, and user silence is an error condition. In this state, the Command/Exception value contains Silence, representing the error condition. The confirmation state is normal when the FirstInitialTimeout property of the active QA contains the default value of 0.

Note 2 In the short time-out confirmation mode, because user silence is not an error condition, the user confirms data elements with silence. In this state, the Command/Exception value is reset to ShortTimeoutConfirmation, representing a no-error condition. Short time-out confirmation occurs when the FirstInitialTimeout property of the active QA contains a value greater than 0.