Prompt Result
Relay.Calling.PromptResult
This object returned from one of synchronous prompt methods that represents the final result of a prompting attempt.
Methods
getConfidence
In a prompt action of type speech, it returns the confidence of the result.
Parameters
None
Returns
number - Confidence of the result on a speech prompt.
Examples
Start prompt and then check the result confidence.
getEvent
Returns the last Relay Event arrived for this operation.
Parameters
None
Returns
Relay.Event - Last Relay Event.
Examples
Start the prompt while playing TTS and then inspect last Relay event payload.
getResult
Returns the user’s input in a prompt attempt. Could be both from speech or digits type.
Parameters
None
Returns
string - User’s input in a prompt attempt.
Examples
Start recording and print the result in a
digitsprompt.
getTerminator
In a prompt action of type digits, it returns the digit that has terminated the attempt.
Parameters
None
Returns
string - Digit that has terminated the prompt attempt.
Examples
Start prompt and then check the terminator digit.
getType
Returns the type of the attempt: digits or speech.
Parameters
None
Returns
string - digits or speech.
Examples
Start prompt and then check the type of the prompt.
isSuccessful
Return true if the prompt attempt succeeded, false otherwise.
Parameters
None
Returns
boolean - True/False accordingly to the state.
Examples
Start the prompt while playing TTS and then check if it has ended successfully.