智能对话分析 获取文件结果详情用于文件复核

By | 2021年4月23日

调用GetResultToReview获取指定文件的质检结果详情数据,用于文件复核。详情数据包括:转写文本、录音地址、命中规则的信息,有了这些信息,就可以听录音、查看转写文本、查看规则的命中位置,进行文件复核了。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String GetResultToReview

系统规定参数。取值:GetResultToReview。

JsonStr String {"taskId":"任务id",“ fileId”:"文件id"}

完整Json字符串信息,具体内容参见以下详细信息。

入参GetResultToReviewRequest说明

属性

值类型

是否必须

说明

taskId

String

任务id。

fileId

String

文件id,通过 获取质检结果(GetResult) 可以获取到,即返回结果中的 recording.id。

返回数据

名称 类型 示例值 描述
Code String 200

结果代码,200表示成功,若为别的值则表示失败,调用方可根据此字段判断失败原因。

Data Struct

详细返回数据。

AudioScheme String https

音频URL的scheme信息,即:http或者https。

AudioURL String sca-ccc-test.oss-cn-beijing.aliyuncs.com/xxxxx

音频URL,与AudioSchedme组成完整的URL。

Comments String xxx

复核意见。

Dialogues Array of Dialogue

对话数据。

Dialogue
Begin Long 8060

这句话的开始时间相对对话整体开始时间的偏移量,毫秒级别

BeginTime String 2019-10-01 11:12:01

这句话的开始时间

EmotionValue Integer 7

情绪能量值1-10

End Long 8660

这句话的结束时间相对对话整体开始时间的偏移量,毫秒级别

HourMinSec String 00:08

这句话的时分秒格式的开始时间,格式:HH:mm:ss

Identity String 客服

角色标识

Role String 客服

说话的角色

SilenceDuration Integer 200

沉默时长

SpeechRate Integer 200

速度,单位:字/分钟

Words String 哪里

对话内容

FileId String xxx

文件id,长整型字符串,数据集主键id,在保存复核结果时使用。

FileMergeName String xxx.wav

文件名称。

HitRuleReviewInfoList Array of HitRuleReviewInfo

命中规则信息。

HitRuleReviewInfo
AutoReview Integer 1

是否自动审核,可能值:1: 不自动审核, 3: 自动审核。

ComplainHistories Array of ComplainHistories

申诉历史信息。

ComplainHistories
Comments String 请听一下录音,重新判定。

申诉理由/申诉处理理由。

OperationTime String 2020-10-16T11:13Z

处理时间。

OperationType Integer 5

状态:3(申诉中);4(申诉驳回);5(申诉通过)。

Operator Long 123456

申诉发起人/处理人的账号ID。

OperatorName String 张三

申诉发起人/处理人的用户名。

Complainable Boolean true

当前评分项坐席是否可以提交申诉(终审后不可再次申诉)。

ConditionHitInfoList Array of ConditionHitInfo

条件。

ConditionHitInfo
Cid List 2000

条件ID。

KeyWords Array of KeyWord

关键词。

KeyWord
Cid String 2000

条件ID。

From Integer 1

第几个字符开始,从0开始,包含from。

Pid Integer 2

对话ID。

Tid String 6fa76916-3ce6-45d8-ac64-01b7f31c7295

语音ID。

To Integer 3

第几个字符结束,不包含to。

Val String 你好

算子命中的关键信息,详见下方 返回参数说明 中的 关键信息Val详解。

Phrase Struct

短句。

Begin Long 10230

这句话的开始时间相对对话整体开始时间的偏移量,毫秒级别

EmotionValue Integer 6

情绪能量值1-10

End Long 10830

这句话的结束时间相对对话整体开始时间的偏移量,毫秒级别

Identity String

身份标识:客户/客服

Pid Integer 3

每一句话的编号

Role String 2

角色:客户/客服

Words String

命中的原句

ReviewInfo Struct

复核信息。

HitId String 013c68142fec4f0899fa6ee0e18bcd7d

命中ID。

ReviewResult Integer 1

复核结果,0:错误;1:正确。

ReviewTime String 2019-10-12 17:06:00

复核时间,yyyy-MM-dd HH:mm:ss。

Reviewer String 123

复核员ID。

Rid Long 451

规则ID。

Rid Long 451

规则ID。

RuleName String 你好

规则名称。

ScoreId Long 3

评分大项id。

ScoreNum Integer -10

评分项的分值。

ScoreSubId Long 4

计分小项ID。

ScoreSubName String 投诉

评分项名称。

ManualScoreInfoList Array of HitRuleReviewInfo

手动添加的评分项信息。

HitRuleReviewInfo
ComplainHistories Array of ComplainHistories

手动添加的评分项的申诉历史信息。

ComplainHistories
Comments String 请听一下录音,重新判定。

申诉理由/申诉处理理由。

OperationTime String 2020-10-16T11:13Z

处理时间。

OperationType Integer 5

状态:3(申诉中);4(申诉驳回);5(申诉通过)。

Operator Long 123456

申诉发起人/处理人的账号ID。

OperatorName String 张三

申诉发起人/处理人的用户名。

Complainable Boolean true

当前评分项坐席是否可以提交申诉(终审后不可再次申诉)。

ScoreId Long 123

评分项大项ID。

ScoreNum Integer -10

评分项小项分值。

ScoreSubId Long 12345

评分项小项ID。

ScoreSubName String 投诉

评分项小项名称。

ReviewHistoryList Array of ReviewHistory

复核历史。

ReviewHistory
ComplainResult Integer 1

申诉处理结果,1:全部申诉都通过;0:至少有一个不通过。

OldScore Integer 90

复核前的得分。

OperatorName String name

复核员用户名。

ReviewResult Integer 1

复核结果,1: 全部规则都正确;0:有至少一个规则错误。

Score Integer 95

复核后的得分。

TimeStr String 2019-10-28 15:21:00

复核时间,格式:yyyy-MM-dd HH:mm:ss。

Type Integer 1

复核类型,0: 自动复核;1:手工复核。

TotalScore Integer 99

得分。

Vid String 6fa76916-3ce6-45d8-ac64-01b7f31***

文件ID。

Message String successful

出错时表示出错详情,成功时为successful

RequestId String 82C91484-B2D5-4D2A-A21F-A6D73F4***

请求id,提工单时可提供此字段值用于排查问题。

Success Boolean true

请求是否成功,调用方可根据此字段来判断请求是否成功:true表示成功;false/null表示失败。

关键信息Val详解

算子名称

val值示例

说明

文字检查-关键字检查

你好

当前句子中命中该算子的文本,即为复核页面查看命中位置时,句子中红色高亮的文本内容

文字检查-文本相似度检查

82

相似度值

文字检查-正则表达式检查

你好

当前句子中命中该算子的文本,即为复核页面查看命中位置时,句子中红色高亮的文本内容

文字检查-上下文重复检查

你好

当前句子中命中该算子的文本,即为复核页面查看命中位置时,句子中红色高亮的文本内容

语音检查-通话静音检查

3200

静音时长(毫秒)

语音检查-语速检查

365

当前句子的语速值

语音检查-抢话检查

2:8

类型为"m:n",m为抢话时长(秒),即客服与客户说话交叉时间;n为当前句子的字数

语音检查-角色判断

你好

当前句子中命中该算子的文本,即为复核页面查看命中位置时,句子中红色高亮的文本内容

语音检查-非正常挂机

3567

最后一句的话结束时间,到挂机时间的毫秒数

语音检查-录音时长检查

56088

录音时长的毫秒数

模型检查-情绪识别模型

辱骂

情绪的具体类型,例如 辱骂、高危

模型检查-客服违规检测模型

讥讽

客服违规的具体类型,例如 讥讽、反问、辱骂

示例

请求示例

http(s)://qualitycheck.cn-hangzhou.aliyuncs.com/?Action=GetResultToReview
&JsonStr={"taskId":"任务id",“ fileId”:"文件id"}
&<公共请求参数>

正常返回示例

XML 格式

<code>200</code>
<data>
    <audio>true</audio>
    <audioURL>sca-ccc-test.oss-cn-beijing.aliyuncs.com/%E7%A1%85%E8%AF%AD-%E7%95%99%E5%AD%A6%E5%BD%95%E9%9F%B3.wav?a=b</audioURL>
    <dialogues>
        <begin>8060</begin>
        <emotionValue>7</emotionValue>
        <end>8660</end>
        <hourMinSec>00:08</hourMinSec>
        <role>客服</role>
        <speechRate>200</speechRate>
        <words>你好</words>
    </dialogues>
    <dialogues>
        <begin>8940</begin>
        <emotionValue>6</emotionValue>
        <end>9590</end>
        <hourMinSec>00:08</hourMinSec>
        <role>客户</role>
        <speechRate>92</speechRate>
        <words>喂</words>
    </dialogues>
    <dialogues>
        <begin>10230</begin>
        <emotionValue>6</emotionValue>
        <end>10830</end>
        <hourMinSec>00:10</hourMinSec>
        <role>客服</role>
        <speechRate>300</speechRate>
        <words>嗯你好</words>
    </dialogues>
    <dialogues>
        <begin>11150</begin>
        <emotionValue>6</emotionValue>
        <end>11890</end>
        <hourMinSec>00:11</hourMinSec>
        <role>客户</role>
        <speechRate>162</speechRate>
        <words>哪里</words>
    </dialogues>
    <dialogues>
        <begin>12910</begin>
        <emotionValue>6</emotionValue>
        <end>23560</end>
        <hourMinSec>00:12</hourMinSec>
        <role>客服</role>
        <speechRate>343</speechRate>
        <words>xxx</words>
    </dialogues>
    <dialogues>
        <begin>25010</begin>
        <emotionValue>6</emotionValue>
        <end>26510</end>
        <hourMinSec>00:25</hourMinSec>
        <role>客户</role>
        <speechRate>240</speechRate>
        <words>xxx</words>
    </dialogues>
    <fileMergeName>xxx.wav</fileMergeName>
    <handScoreInfoList>
        <scoreId>118</scoreId>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>1</scoreNum>
            <scoreSubId>119</scoreSubId>
            <scoreSubName>test</scoreSubName>
            <scoreType>3</scoreType>
        </scoreInfos>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>123</scoreNum>
            <scoreSubId>120</scoreSubId>
            <scoreSubName>123</scoreSubName>
            <scoreType>1</scoreType>
        </scoreInfos>
        <scoreName>test</scoreName>
    </handScoreInfoList>
    <handScoreInfoList>
        <scoreId>24</scoreId>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>5</scoreNum>
            <scoreSubId>25</scoreSubId>
            <scoreSubName>加分12</scoreSubName>
            <scoreType>1</scoreType>
        </scoreInfos>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>10</scoreNum>
            <scoreSubId>26</scoreSubId>
            <scoreSubName>加分2</scoreSubName>
            <scoreType>1</scoreType>
        </scoreInfos>
        <scoreName>加分测试1</scoreName>
    </handScoreInfoList>
    <handScoreInfoList>
        <scoreId>27</scoreId>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>5</scoreNum>
            <scoreSubId>28</scoreSubId>
            <scoreSubName>扣分1</scoreSubName>
            <scoreType>3</scoreType>
        </scoreInfos>
        <scoreInfos>
            <hit>1</hit>
            <scoreNum>10</scoreNum>
            <scoreSubId>29</scoreSubId>
            <scoreSubName>扣分2</scoreSubName>
            <scoreType>3</scoreType>
        </scoreInfos>
        <scoreName>扣分测试</scoreName>
    </handScoreInfoList>
    <hitRuleReviewInfoList>
        <autoReview>0</autoReview>
        <conditionHitInfoList>
            <cid>2000</cid>
            <keyWords>
                <from>0</from>
                <pid>0</pid>
                <tid>6fa76916-3ce6-45d8-ac64-01b7f31c7295</tid>
                <to>2</to>
                <val>你好</val>
            </keyWords>
            <phrase>
                <begin>8060</begin>
                <emotionValue>7</emotionValue>
                <end>8660</end>
                <identity>客服</identity>
                <pid>0</pid>
                <role>客服</role>
                <words>你好</words>
            </phrase>
        </conditionHitInfoList>
        <conditionHitInfoList>
            <cid>2000</cid>
            <keyWords>
                <from>1</from>
                <pid>2</pid>
                <tid>6fa76916-3ce6-45d8-ac64-01b7f31c7295</tid>
                <to>3</to>
                <val>你好</val>
            </keyWords>
            <phrase>
                <begin>10230</begin>
                <emotionValue>6</emotionValue>
                <end>10830</end>
                <identity>客服</identity>
                <pid>2</pid>
                <role>客服</role>
                <words>嗯你好</words>
            </phrase>
        </conditionHitInfoList>
        <reviewInfo>
            <hitId>013c68142fec4f0899fa6ee0e18bcd7d</hitId>
            <rid>451</rid>
        </reviewInfo>
        <rid>451</rid>
        <ruleName>开头说你好</ruleName>
        <scoreId>-1</scoreId>
        <scoreSubId>-1</scoreSubId>
    </hitRuleReviewInfoList>
    <isAudio>true</isAudio>
    <manualScoreMappingList>119</manualScoreMappingList>
    <totalScore>99</totalScore>
    <vid>6fa76916-3ce6-45d8-ac64-01b7f31c7295</vid>
</data>
<message>successful</message>
<requestId>82C91484-B2D5-4D2A-A21F-A6D73F4D55C6</requestId>
<success>true</success>

JSON 格式

{
  "code": "200",
  "data": {
    "audio": true,
    "audioURL": "sca-ccc-test.oss-cn-beijing.aliyuncs.com/%E7%A1%85%E8%AF%AD-%E7%95%99%E5%AD%A6%E5%BD%95%E9%9F%B3.wav?a=b",
    "dialogues": [
      {
        "begin": 8060,
        "emotionValue": 7,
        "end": 8660,
        "hourMinSec": "00:08",
        "role": "客服",
        "speechRate": 200,
        "words": "你好"
      },
      {
        "begin": 8940,
        "emotionValue": 6,
        "end": 9590,
        "hourMinSec": "00:08",
        "role": "客户",
        "speechRate": 92,
        "words": "喂"
      },
      {
        "begin": 10230,
        "emotionValue": 6,
        "end": 10830,
        "hourMinSec": "00:10",
        "role": "客服",
        "speechRate": 300,
        "words": "嗯你好"
      },
      {
        "begin": 11150,
        "emotionValue": 6,
        "end": 11890,
        "hourMinSec": "00:11",
        "role": "客户",
        "speechRate": 162,
        "words": "哪里"
      },
      {
        "begin": 12910,
        "emotionValue": 6,
        "end": 23560,
        "hourMinSec": "00:12",
        "role": "客服",
        "speechRate": 343,
        "words": "xxx"
      },
      {
        "begin": 25010,
        "emotionValue": 6,
        "end": 26510,
        "hourMinSec": "00:25",
        "role": "客户",
        "speechRate": 240,
        "words": "xxx"
      }
    ],
    "fileMergeName": "xxx.wav",
    "handScoreInfoList": [
      {
        "scoreId": 118,
        "scoreInfos": [
          {
            "hit": 1,
            "scoreNum": 1,
            "scoreSubId": 119,
            "scoreSubName": "test",
            "scoreType": 3
          },
          {
            "hit": 1,
            "scoreNum": 123,
            "scoreSubId": 120,
            "scoreSubName": "123",
            "scoreType": 1
          }
        ],
        "scoreName": "test"
      },
      {
        "scoreId": 24,
        "scoreInfos": [
          {
            "hit": 1,
            "scoreNum": 5,
            "scoreSubId": 25,
            "scoreSubName": "加分12",
            "scoreType": 1
          },
          {
            "hit": 1,
            "scoreNum": 10,
            "scoreSubId": 26,
            "scoreSubName": "加分2",
            "scoreType": 1
          }
        ],
        "scoreName": "加分测试1"
      },
      {
        "scoreId": 27,
        "scoreInfos": [
          {
            "hit": 1,
            "scoreNum": 5,
            "scoreSubId": 28,
            "scoreSubName": "扣分1",
            "scoreType": 3
          },
          {
            "hit": 1,
            "scoreNum": 10,
            "scoreSubId": 29,
            "scoreSubName": "扣分2",
            "scoreType": 3
          }
        ],
        "scoreName": "扣分测试"
      }
    ],
    "hitRuleReviewInfoList": [
      {
        "autoReview": 0,
        "conditionHitInfoList": [
          {
            "cid": [
              "2000"
            ],
            "keyWords": [
              {
                "from": 0,
                "pid": 0,
                "tid": "6fa76916-3ce6-45d8-ac64-01b7f31c7295",
                "to": 2,
                "val": "你好"
              }
            ],
            "phrase": {
              "begin": 8060,
              "emotionValue": 7,
              "end": 8660,
              "identity": "客服",
              "pid": 0,
              "role": "客服",
              "words": "你好"
            }
          },
          {
            "cid": [
              "2000"
            ],
            "keyWords": [
              {
                "from": 1,
                "pid": 2,
                "tid": "6fa76916-3ce6-45d8-ac64-01b7f31c7295",
                "to": 3,
                "val": "你好"
              }
            ],
            "phrase": {
              "begin": 10230,
              "emotionValue": 6,
              "end": 10830,
              "identity": "客服",
              "pid": 2,
              "role": "客服",
              "words": "嗯你好"
            }
          }
        ],
        "reviewInfo": {
          "hitId": "013c68142fec4f0899fa6ee0e18bcd7d",
          "rid": 451
        },
        "rid": 451,
        "ruleName": "开头说你好",
        "scoreId": -1,
        "scoreSubId": -1
      }
    ],
    "isAudio": true,
    "manualScoreMappingList": [
      "119"
    ],
    "totalScore": 99,
    "vid": "6fa76916-3ce6-45d8-ac64-01b7f31c7295"
  },
  "message": "successful",
  "requestId": "82C91484-B2D5-4D2A-A21F-A6D73F4D55C6",
  "success": true
}

错误码

访问错误中心查看更多错误码。

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Iconic One Theme | Powered by Wordpress