Share via


RunSpeech - History Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Command/Exception History property uses the scripted RunSpeech object to store recognition exceptions or values of Command.Type that 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 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];

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

For example, when RunSpeech handles two QA controls, the Command/Exception history changes:

  1. QA1 completes control activation.
  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 the QA2ClientActivationFunction property and RunSpeech.ActiveQA.History contains QA1 data.
  5. QA2ClientActivationFunction returns true.
  6. RunSpeech sets RunSpeech.ActiveQA to QA2 and then 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 control, the NoReco value is inserted into the array. Additional Command/Exception history values are listed in the following table.

Event Command/Exception Value Detail

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

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

Reco raises a silence event (short time-out confirmation).

ShortTimeoutConfirmation

In 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 zero.

Transition to new QA.

History is cleared

See Also

Other Resources

SpeechControls Scripting