com.nuance.nmdp.speechkit
Interface Recognition


public interface Recognition

Contains recognition results returned from Recognizer.


Nested Class Summary
static interface Recognition.Result
          A single recognition result returned by getResult(int)(), containing the recognized text and the confidence score.
 
Method Summary
 Recognition.Result getResult(int index)
          Get a recognition Recognition.Result indicating what may have been said, and the likelihood that it was said.
 int getResultCount()
          Get the number of recognition results to choose from.
 java.lang.String getSuggestion()
          Get a server-generated suggestion suitable for presentation to the user.
 

Method Detail

getSuggestion

java.lang.String getSuggestion()
Get a server-generated suggestion suitable for presentation to the user.

This is a suggestion to the user about how he or she can improve recognition performance and is based on the audio received. Examples include moving to a less noisy location if the environment is extremely noisy, or waiting a bit longer to start speaking if the beginning of the recording seems truncated. Results are often still present and may still be of useful quality.

Returns:
The suggestion, or null if there is none.

getResultCount

int getResultCount()
Get the number of recognition results to choose from.

Returns:
The result count.

getResult

Recognition.Result getResult(int index)
Get a recognition Recognition.Result indicating what may have been said, and the likelihood that it was said. Results are ordered by likelihood, so getResult(0) will return the highest confidence result.

Parameters:
index - The index of the result. Must be >= 0 and < getResultCount().
Returns:
The recognition result.