다음을 통해 공유


RecognitionResult Class

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.RecognitionResult

Implements

java.lang.AutoCloseable

public class RecognitionResult
implements java.lang.AutoCloseable

Contains detailed information about result of a recognition operation.

Constructor Summary

Modifier Constructor Description
protected RecognitionResult(long result)

Internal constructor for creating a RecognitionResult from a native handle.

Method Summary

Modifier and Type Method and Description
void close()

Explicitly frees any external resource attached to the object

java.math.BigInteger getDuration()

Duration of recognized speech in 100nsec increments.

SafeHandle getImpl()

Returns the recognition result implementation.

java.math.BigInteger getOffset()

Offset of recognized speech in 100nsec increments.

PropertyCollection getProperties()

The set of properties exposed in the result.

ResultReason getReason()

Specifies reason the result was created.

java.lang.String getResultId()

Specifies the result identifier.

java.lang.String getText()

Presents the recognized text in the result.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

RecognitionResult

protected RecognitionResult(long result)

Internal constructor for creating a RecognitionResult from a native handle.

Parameters:

result - The native handle.

Method Details

close

public void close()

Explicitly frees any external resource attached to the object

getDuration

public BigInteger getDuration()

Duration of recognized speech in 100nsec increments.

Returns:

Duration of recognized speech in 100nsec increments.

getImpl

public SafeHandle getImpl()

Returns the recognition result implementation.

Returns:

The implementation of the result.

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.

getReason

public ResultReason getReason()

Specifies reason the result was created.

Returns:

Specifies reason of the result.

getResultId

public String getResultId()

Specifies the result identifier.

Returns:

Specifies the result identifier.

getText

public String getText()

Presents the recognized text in the result.

Returns:

Presents the recognized text in the result.

Applies to