CancellationDetails class
包含有关取消结果的原因的详细信息。
属性
| Error |
如果识别失败,则错误代码。 已在版本 1.1.0 中添加。 |
| error |
如果识别失败,请提供发生错误的详细信息。 |
| reason | 识别被取消的原因。 |
方法
| from |
为已取消的 RecognitionResult 创建 CancellationDetails 对象的实例。 |
属性详细信息
ErrorCode
如果识别失败,则错误代码。 已在版本 1.1.0 中添加。
CancellationErrorCode ErrorCode
属性值
表示错误原因的错误代码。
errorDetails
如果识别失败,请提供发生错误的详细信息。
string errorDetails
属性值
string
一个表示错误详细信息的字符串。
reason
方法详细信息
fromResult(RecognitionResult | SpeechSynthesisResult)
为已取消的 RecognitionResult 创建 CancellationDetails 对象的实例。
static function fromResult(result: RecognitionResult | SpeechSynthesisResult): CancellationDetails
参数
- result
取消的结果。
返回
正在创建的取消详细信息对象。