所有api接口都需要鉴权规则,具体详情前往鉴权规则查看

离线转写接口

1.提交离线转写

请求参数

字段名称 字段类型 是否必传 字段描述
callUniquedId string 通话ID
callBackUrl string 结果回调地址(转写成功后向此地址推送结果)

请求示例

curl --location --request POST
 'http://v7openapi.7moor.com/openapi/v1/asr/translate' \
--header 'm7-appkey: 2000143' \
--header 'm7-nonce: 025513' \
--header 'm7-sign: 77iIqkeVA8v7FnYQnlpzvGFMBEpXaT9+30+iMtN6L0g=' \
--header 'm7-timestamp: 1604580737' \
--header 'content-type: application/json' \
--data-raw '{
    "callUniquedId": "438155686056583168",
    "callBackUrl": “http://139.199.123.105:5002/ossService?tempId=552d501e-d48c-4bc1-b4cb-25c6e8977d57”
}'

返回参数

字段名称 字段类型 是否必传 字段描述
taskId string 任务ID

返回示例

{
    "success": true,
    "code": "200",
    "message": "200 ok!",
    "data": {
        "taskId": "611dc9156b21dc5d40402860"
    }
}

2.获取离线转写结果

请求参数

字段名称 字段类型 是否必传 字段描述
callUniquedId string 通话ID
taskId string 任务ID

请求示例

```   curl --location --request POST 'http://v7openapi.7moor.com/openapi/v1/asr/getResult' \ --header 'm7-appkey: 2000143' \ --header 'm7-nonce: 025513' \ --header 'm7-sign: 77iIqkeVA8v7FnYQnlpzvGFMBEpXaT9+30+iMtN6L0g=' \ --header 'm7-timestamp: 1604580737' \ --header 'content-type: application/json' \ --data-raw '{ "callUniquedId": "438155686056583168",

}'

```
返回参数

字段名称 字段类型 是否必传 字段描述
id string uuid
role string 角色,AGENT, VISITOR (根据channelId做的判断)
beginTime string 该句的起始时间偏移,单位为毫秒
endTime string 该句的结束时间偏移,单位为毫秒
silenceDuration number 本句与上一句之间的静音时长,单位为秒
channelId number 该句所属音轨ID
speechRate number 本句的平均语速,单位:字数/分钟
text string 该句的识别文本结果
emotionValue number 情绪能量值,取值为音量分贝值/10。取值范围:[1,10]。值越高情绪越强烈。

返回示例

{ "success": true, "code": "200", "message": "200 ok!", "data": { "taskId": "611dc9156b21dc5d40402860", "callUniquedId": "438155686056583168", "taskStatus": "success", "pushStatus": "success", "sentences": [ { "id": "18ba74fe-a0a5-4848-929a-e07863eb7c2a", "role": "AGENT", "beginTime": 2440, "endTime": 6000, "silenceDuration": 0, "channelId": 0, "speechRate": 235, "text": "喂,您好,请问您的需求来源是什么?", "emotionValue": 5 }, { "id": "1ff59498-f20e-4ef4-a09e-0ebdf1ecbc0d", "role": "VISITOR", "beginTime": 8140, "endTime": 18110, "silenceDuration": 0, "channelId": 1, "speechRate": 204, "text": "哦,就只能快点儿,就是一个一千四一百六十三天完毕,按现在就可以考试一次,需要。", "emotionValue": 4.8 }, { "id": "89039242-e16d-44c4-aef3-a3d0e268351e", "role": "VISITOR", "beginTime": 18510, "endTime": 19900, "silenceDuration": 0, "channelId": 1, "speechRate": 172, "text": "我看一下。", "emotionValue": 4.7 }, { "id": "51bf375f-bf31-4d9d-b728-87b6b4e4a67c", "role": "AGENT", "beginTime": 21660, "endTime": 24140, "silenceDuration": 15, "channelId": 0, "speechRate": 241, "text": "好的好的,知道知道,拜拜。", "emotionValue": 5.3 }, { "id": "b3cca7b4-3e9b-4d13-a9df-5e61c55ec549", "role": "VISITOR", "beginTime": 24480, "endTime": 25570, "silenceDuration": 0, "channelId": 1, "speechRate": 165, "text": "好的嗯。", "emotionValue": 4.7 } ] } }