Freigeben über


status Property

  Microsoft Speech Technologies Homepage

Indicates the success or failure of the most recent subqueue operation. Read-only.

statusvalue = PromptQueue.status

Remarks

When an error message is delivered successfully, the status property is set to zero. A non-zero value indicates that an error has occurred. The following table shows possible errors and their status values:

Value Description
   0 The prompt playback occurred normally. No errors were encountered.
  -1 A generic speech output resource error occurred during playback.
  -2 The start method call was made on an empty prompt subqueue.
  -3 The change method was called but the Speech Platform does not support it.
 -30 A disconnect initiated the flush method, or prompt playback was attempted after a disconnect. (Telephony only)

Events that cause the status values to be set include onempty and onerror.

Example

The following example demonstrates the status property.

PromptQueue.onempty = OnPromptQueueEmpty();
PromptQueue.onerror = OnPromptQueueError();
StartEmptyPromptQueue();
            
function OnPromptQueueEmpty() {
  LogMessage("INFORMATIONAL", "PromptQueue playback has completed, the status is: " + PromptQueue.status);
}
            
function OnPromptQueueError() {   
  LogMessage("ERROR", "A PromptQueue error has occurred, the status is: " + PromptQueue.status);
}

function StartEmptyPromptQueue() {
  PromptQueue.Start();
}

See Also

promptqueue Object |  onempty Event | onerror Event