云服务器内容精选

  • 示例 { "resp_type": "RESULT", "trace_id": "567e8537-a89c-13c3-a882-826321939651", "segments": [ { "start_time": 100, "end_time": 1500, "is_final": false, "result": { "text": "第一句中间结果", "word_info": [ { "start_time": 100, "end_time": 800, "word": "第一" }, { "start_time": 800, "end_time": 1000, "word": "句" }, { "start_time": 1000, "end_time": 1500, "word": "结果" } ], "score": 0.0 }, }, ] }
  • 响应消息 表1 响应参数 参数名 参数类型 说明 resp_type String 响应类型。参数值为RESULT,表示识别结果响应。 trace_id String 服务内部的令牌,可用于在日志中追溯具体流程。 segments Array of objects 多句结果。 请参考表 segment 数据结构。 表2 segment 数据结构 参数名 参数类型 说明 start_time Integer 相对时间戳,表示一句的起始,单位为ms。 end_time Integer 相对时间戳,表示一句的结束,单位为ms。 is_final Boolen 输出是否为最终结果。 true表示是最终结果, false表示为中间临时结果。 result Object 调用成功表示识别结果,调用失败时无此字段。 请参考表 result数据结构。 表3 result数据结构 参数名 参数类型 说明 text String 识别结果。 score Float 识别结果的置信度,取值范围:0~1。此值仅会在最终结果时被赋值,在中间结果时统一置为“0.0”。 说明: 目前置信度作用不是太大,请勿过多依赖此值。 word_info Array of Object 分词输出列表。 表4 word_info 数据结构 参数名 是否必选 参数类型 说明 start_time 否 Integer 起始时间 end_time 否 Integer 结束时间 word 否 String 分词