乐享知识库接口文档 请求URL
GET https://lxapi.lexiangla.com/cgi-bin/v1/kb/entries/{entry_id}/parsed-asr-content
请求头
| 参数 | 是否必须 | 说明 |
|---|---|---|
| Authorization | 是 | 接口调用凭证 access_token 值格式:"Bearer access_token" 示例值:"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJS" |
其他说明
| 事项 | 说明 |
|---|---|
| 权限要求 | AI 助手 |
| 授权范围 | AppKey绑定团队时,入参entry_id知识需在授权的团队下 |
| 频率限制 | 3000次/分钟 |
参数说明
| 参数 | 是否必须 | 说明 |
|---|---|---|
| entry_id | 是 | 知识节点ID(仅当知识节点为音视频类型 entry_type=video/audio 时返回解析结果) |
| lang | 否 | 目标语种代码,支持的目标语种见 支持的目标语种(en/zh/ja/ko/th/vi/es/id/tl/hi/ar/fr/de/pt/it/nl 共 16 种)。不传时返回源语音识别文稿;传入时返回该语言的翻译文稿,结构同源文稿一致。该语言从未翻译过时返回 30021006 错误;翻译文稿落后于源稿(源稿已被编辑过、翻译已过期)时返回 30021007 错误。此时可通过 发起音视频内容翻译 接口发起对应语种的翻译,翻译完成后再次调用本接口获取译文 |
响应
200 Ok 状态码
{
"data": {
"type": "kb_entry",
"id": "5c5adde29a14471c85f5a1b2xxxxxxxx",
"attributes": {
"name": "音视频标题",
"parsed_asr_content": [
{
"e": 12550,
"l": [
{
"e": 900,
"s": 0,
"w": "My dear friend,",
"id": "0b3eafccc3cf11f0913ad65547d418e6"
},
{
"e": 2800,
"s": 1000,
"w": " welcome back to the fourth. 亲爱同学,",
"id": "0b3eb170c3cf11f0acddd65547d418e6"
},
{
"e": 3050,
"s": 2800,
"w": "你好,",
"id": "0b3eb224c3cf11f097f2d65547d418e6"
},
{
"e": 6150,
"s": 3050,
"w": "欢迎你回到我们的园林英语全能提升训练营选修课,",
"id": "0b3eb2bac3cf11f0bb87d65547d418e6"
},
{
"e": 8200,
"s": 6150,
"w": "考研英语复试的第一节,",
"id": "0b3eb35ac3cf11f0ac5dd65547d418e6"
},
{
"e": 9100,
"s": 8450,
"w": "这节课呢,",
"id": "0b3eb3f0c3cf11f08580d65547d418e6"
},
{
"e": 12550,
"s": 9100,
"w": "我们来讲一下考研英语复试整体应该如何去准备。",
"id": "0b3eb47cc3cf11f0ad0ed65547d418e6"
}
],
"s": 0
},
{
"e": 27825,
"l": [
{
"e": 13750,
"s": 12900,
"w": "当然我说一下,",
"id": "0b3eb512c3cf11f082f4d65547d418e6"
},
{
"e": 15775,
"s": 13925,
"w": "这个复试的概念比较广,",
"id": "0b3eb5a8c3cf11f085c8d65547d418e6"
},
{
"e": 16325,
"s": 15775,
"w": "比较大,",
"id": "0b3eb63ec3cf11f085e7d65547d418e6"
},
{
"e": 18900,
"s": 16325,
"w": "每个学校的复试的流程是不一样的,",
"id": "0b3eb6d4c3cf11f08efad65547d418e6"
},
{
"e": 21375,
"s": 19100,
"w": "而且如果你是英语专业同学的话,",
"id": "0b3eb76ac3cf11f0a7d7d65547d418e6"
},
{
"e": 23800,
"s": 21375,
"w": "你的复试要求肯定就会更难更强更高,",
"id": "0b3eb800c3cf11f09ee6d65547d418e6"
},
{
"e": 27825,
"s": 24250,
"w": "那我现在指的是对于大部分人来讲的复试需求。",
"id": "0b3eb896c3cf11f0854dd65547d418e6"
}
],
"s": 12900
}
]
}
}
}
参数说明
| 参数 | 说明 |
|---|---|
| name | 音视频标题 |
| parsed_asr_content | 音视频解析结果-段落列表(数组) |
| parsed_asr_content[_].s | 音视频解析结果-段落开始时间(毫秒) |
| parsed_asr_content[_].e | 音视频解析结果-段落结束时间(毫秒) |
| parsed_asr_content[_].l | 音视频解析结果-段落内短句列表(数组) |
| parsed_asr_content[].l[].s | 音视频解析结果-短句开始时间(毫秒) |
| parsed_asr_content[].l[].e | 音视频解析结果-短句结束时间(毫秒) |
| parsed_asr_content[].l[].w | 音视频解析结果-短句文本 |
错误说明
entry_id 不存在{
"errors": [
{
"detail": "不存在ID为`5ccc7a59ef5044cc818fc16a2685d1fd`的kb_entry资源"
}
]
}
{
"errors": [
{
"detail": "entry type is not allowed"
}
]
}
{
"code": 400,
"message": "asr content not found",
"request_id": "783fea9b-6dda-48e6-88f7-d4409c039efc",
"errors": [
{
"detail": "asr content not found"
}
]
}
{
"code": 400,
"message": "asr task is not finished",
"request_id": "783fea9b-6dda-48e6-88f7-d4409c039efc",
"errors": [
{
"detail": "asr task is not finished"
}
]
}
lang 传入时的翻译业务错误为 {code, message, request_id, errors} 格式:{
"code": 30021006,
"message": "该语言的翻译字幕不存在",
"request_id": "783fea9b-6dda-48e6-88f7-d4409c039efc",
"errors": [
{
"detail": "该语言的翻译字幕不存在"
}
]
}
业务错误码说明(lang 传入时)
| 错误码 | 说明 |
|---|---|
| 30021006 | 该语言的翻译文稿不存在(从未翻译过,该语言的翻译字幕不存在) |
| 30021007 | 翻译文稿已过期(源稿已被编辑过、需重新翻译,翻译字幕已过期,源稿已更新) |
30021006 / 30021007 错误可通过 发起音视频内容翻译 接口发起对应语种的翻译,翻译完成后再次调用本接口获取译文。