Class RecognitionResult
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.RecognitionResult
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
KeywordRecognitionResult,SpeechRecognitionResult,TranslationRecognitionResult
public class RecognitionResult extends Object implements AutoCloseable
Contains detailed information about result of a recognition operation.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRecognitionResult(long result)Internal constructor for creating a RecognitionResult from a native handle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Explicitly frees any external resource attached to the objectBigIntegergetDuration()Duration of recognized speech in 100nsec increments.SafeHandlegetImpl()Returns the recognition result implementation.BigIntegergetOffset()Offset of recognized speech in 100nsec increments.PropertyCollectiongetProperties()The set of properties exposed in the result.ResultReasongetReason()Specifies reason the result was created.StringgetResultId()Specifies the result identifier.StringgetText()Presents the recognized text in the result.
-
-
-
Method Detail
-
getResultId
public String getResultId()
Specifies the result identifier.- Returns:
- Specifies the result identifier.
-
getReason
public ResultReason getReason()
Specifies reason the result was created.- Returns:
- Specifies reason of the result.
-
getText
public String getText()
Presents the recognized text in the result.- Returns:
- Presents the recognized text in the result.
-
getDuration
public BigInteger getDuration()
Duration of recognized speech in 100nsec increments.- Returns:
- Duration of recognized speech in 100nsec increments.
-
getOffset
public BigInteger getOffset()
Offset of recognized speech in 100nsec increments.- Returns:
- Offset of recognized speech in 100nsec increments.
-
getProperties
public PropertyCollection getProperties()
The set of properties exposed in the result.- Returns:
- The set of properties exposed in the result.
-
close
public void close()
Explicitly frees any external resource attached to the object- Specified by:
closein interfaceAutoCloseable
-
getImpl
public SafeHandle getImpl()
Returns the recognition result implementation.- Returns:
- The implementation of the result.
-
-