TranslationRecognitionResult class

Translation text result.

Extends

Constructors

TranslationRecognitionResult(Translations, string, ResultReason, string, number, number, string, string, PropertyCollection)

Creates and initializes an instance of this class.

Properties

duration

Duration of recognized speech in 100 nano second incements.

errorDetails

In case of an unsuccessful recognition, provides details of the occurred error.

offset

Offset of recognized speech in 100 nano second incements.

properties

The set of properties exposed in the result.

reason

Specifies status of the result.

resultId

Specifies the result identifier.

text

Presents the recognized text in the result.

translations

Presents the translation results. Each item in the dictionary represents a translation result in one of target languages, where the key is the name of the target language, in BCP-47 format, and the value is the translation text in the specified language.

Constructor Details

TranslationRecognitionResult(Translations, string, ResultReason, string, number, number, string, string, PropertyCollection)

Creates and initializes an instance of this class.

new TranslationRecognitionResult(translations: Translations, resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection)

Parameters

translations
Translations

The translations.

resultId
string

The result id.

reason
ResultReason

The reason.

text
string

The recognized text.

duration
number

The duration.

offset
number

The offset into the stream.

errorDetails
string

Error details, if provided.

json
string

Additional Json, if provided.

properties
PropertyCollection

Additional properties, if provided.

Property Details

duration

Duration of recognized speech in 100 nano second incements.

public duration: number

Property Value

number

errorDetails

In case of an unsuccessful recognition, provides details of the occurred error.

public errorDetails: string

Property Value

string

offset

Offset of recognized speech in 100 nano second incements.

public offset: number

Property Value

number

properties

The set of properties exposed in the result.

public properties: PropertyCollection

Property Value

reason

Specifies status of the result.

public reason: ResultReason

Property Value

resultId

Specifies the result identifier.

public resultId: string

Property Value

string

text

Presents the recognized text in the result.

public text: string

Property Value

string

translations

Presents the translation results. Each item in the dictionary represents a translation result in one of target languages, where the key is the name of the target language, in BCP-47 format, and the value is the translation text in the specified language.

public translations: Translations

Property Value