com.nuance.nmdp.speechkit
Class Prompt

java.lang.Object
  extended by com.nuance.nmdp.speechkit.Prompt

public final class Prompt
extends java.lang.Object

An audio or vibration prompt created by SpeechKit.defineAudioPrompt(int)() or vibrate(). Once created, prompts may be played during a Recognizer's recognition, either due to being configured in SpeechKit.setDefaultRecognizerPrompts(com.nuance.nmdp.speechkit.Prompt, com.nuance.nmdp.speechkit.Prompt, com.nuance.nmdp.speechkit.Prompt, com.nuance.nmdp.speechkit.Prompt)() or Recognizer.setPrompt(int, com.nuance.nmdp.speechkit.Prompt)().


Method Summary
 void release()
          Release the resources used by this prompt.
static Prompt vibration(int duration)
          Get a prompt that vibrates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

release

public void release()
Release the resources used by this prompt. This prompt will not be usable after being released.


vibration

public static Prompt vibration(int duration)
Get a prompt that vibrates. This prompt will be a light-weight object, and not tied to a particular SpeechKit instance. It does not need to be released.

Parameters:
duration - The duration (in milliseconds) of the vibration. Must be greater than 0.
Returns:
A Prompt object, which can be used to cause a Recognizer to vibrate at certain stages of the recognition. Returns null if the duration is invalid.