Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

PushAsrTextRequest

尹振坤 edited this page Sep 1, 2020 · 1 revision

转写文本推送接口:PushAsrTextRequest

接口说明

接收平台上传的asrText信息

SDK对象

PushAsrTextRequest

接口地址

POST: smartlink-sqc-openapi.tinetcloud.com/sqc/asr_text(线上环境)

POST: smartlink-sqc-openapi-test.tinetcloud.com/sqc/asr_text(测试环境)

接口请求方法

POST

请求参数

参数名 类型 是否必选 描述
uniqueId String 是 唯一标识 该uniqueId与做转写、推送cdr话单的uniqueId一致
userId Integer 是 用户ID,即我们自己内部平台的企业ID
asrText Object(AsrText) 是 转写文本对象
recordSide String 是 如果录音做了分轨,该录音是双轨录音的一侧,必须指定该录音文件是 agent/client ,便于区分两侧。agent是坐席侧client是客户侧, 不传值默认是单轨录音.
fastAsr Boolean 否 非特殊情况,不建议开启

AsrText 对象:

参数名 类型 是否必选 描述
bizDuration Integer 是 识别的录音时长
result List 是 转写的结果数据

SentenceResult 对象:

参数名 类型 是否必选 描述
channelId Integer 是 该句所属的音轨ID
beginTime Integer 是 该句的起始时间偏移,单位:毫秒
endTime Integer 是 该句的结束时间偏移,单位:毫秒
emotionValue Integer 是 情绪能量值1-10,值越高情绪越强烈
silenceDuration Integer 是 本句与上一句之间的静音时长,单位:毫秒
speechRate Integer 是 本句的平均语速,单位:每分钟字数
text String 是 本句的转写文本结果

返回结果

调用成功200

成功:
{
    "requestId": null,
     "result":"success",
    "message": "asr推送成功,正在质检"
}
失败:
{
    "requestId": null,
    "result":"failed",
    "message": "未推送cdr数据,请先推送cdr"
}

调用失败400

失败的请求会已异常的形式抛出:
com.tinet.smartlink.commons.sdk.core.exceptions.ServerException: uniqueId不符合格式要求
.........