ConversationTranslationResult class
翻译文本结果。
属性
| duration | 100 纳秒增量的已识别语音持续时间。 |
| error |
如果识别失败,请提供发生错误的详细信息。 |
| language | 检测到主要语言。 |
| language |
主要语言检测置信度(未知、低、中、高)。 |
| offset | 以 100 纳秒为增量的已识别语音偏移量。 |
| original |
此结果的原始语言。 |
| participant |
此结果为参与者的唯一标识符。 |
| properties | 结果中公开的属性集。 |
| reason | 指定结果的状态。 |
| result |
指定结果标识符。 |
| speaker |
对话听录/id 方案中的说话人 ID |
| text | 在结果中显示已识别的文本。 |
| translations | 显示翻译结果。 字典中的每个项都表示目标语言之一的翻译结果,其中键是目标语言的名称,采用 BCP-47 格式,值为指定语言的翻译文本。 |
构造函数详细信息
ConversationTranslationResult(string, Translations, string, string, ResultReason, string, number, number, string, string, PropertyCollection)
new ConversationTranslationResult(participantId: string, translations: Translations, originalLanguage?: string, resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection)
参数
- participantId
-
string
- translations
- Translations
- originalLanguage
-
string
- resultId
-
string
- reason
- ResultReason
- text
-
string
- duration
-
number
- offset
-
number
- errorDetails
-
string
- json
-
string
- properties
- PropertyCollection
属性详细信息
duration
100 纳秒增量的已识别语音持续时间。
number duration
属性值
number
100 纳秒增量的已识别语音持续时间。
errorDetails
如果识别失败,请提供发生错误的详细信息。
string errorDetails
属性值
string
错误简要说明。
language
检测到主要语言。
string language
属性值
string
检测到语言。
languageDetectionConfidence
主要语言检测置信度(未知、低、中、高)。
string languageDetectionConfidence
属性值
string
检测置信度强度。
offset
以 100 纳秒为增量的已识别语音偏移量。
number offset
属性值
number
以 100 纳秒为增量的已识别语音偏移量。
originalLang
此结果的原始语言。
string originalLang
属性值
string
participantId
此结果为参与者的唯一标识符。
string participantId
属性值
string
properties
reason
resultId
指定结果标识符。
string resultId
属性值
string
指定结果标识符。
speakerId
对话听录/id 方案中的说话人 ID
string speakerId
属性值
string
给定结果中的说话人 ID
text
在结果中显示已识别的文本。
string text
属性值
string
在结果中显示已识别的文本。
translations
显示翻译结果。 字典中的每个项都表示目标语言之一的翻译结果,其中键是目标语言的名称,采用 BCP-47 格式,值为指定语言的翻译文本。
Translations translations
属性值
保存所请求的所有翻译的当前翻译映射。
继承的方法详细信息
fromSpeechRecognitionResult(SpeechRecognitionResult)
static function fromSpeechRecognitionResult(result: SpeechRecognitionResult): TranslationRecognitionResult
参数
- result
- SpeechRecognitionResult
返回
继承自 TranslationRecognitionResult.fromSpeechRecognitionResult