- 账户权益管理API
- 短视频离线合成API
- 直播OpenApi
- 调用须知
- 常见问题
- 实时信息同步
- 直播阿凡达模式WS连接
- 直播流程相关
- 直播间详情GET
- 添加直播间素材,创建直播间POST
- 开始直播POST
- 获取开播的详情POST
- 结束直播POST
- 插入播放音频POST
- 获取当前播放的音频信息POST
- 跳转到指定场景指定音频播放POST
- 直播间ping后端的接口 10s/次轮训POST
- 获取当前账号正在直播的直播间信息GET
- 导购商品手动加到插播列表POST
- 开播前更新直播间配置POST
- 直播中更新直播间素材POST
- 直播中插入播放副本到列表POST
- 预览直播接口POST
- 获取预览链接POST
- 获取当前账号正在直播的直播间列表GET
- 直播并发列表接口GET
- 删除直播间 DELETE
- 更新直播间的推流地址POST
- 场景隐藏和公开POST
- 删除当前已有的音频POST
- 新增场景POST
- 场景排序POST
- 直播素材准备和编辑
- 数字人互动
直播中插入播放副本到列表
POST
/openApiDigitalPerson/liveProcess/addAudioList
请求参数
Header 参数
authorization
string
必需
示例值:
{{auth|md5}}
req_from
string
必需
示例值:
C
timestamp
integer
时间戳
示例值:
{{timestamp}}
app_id
string
必需
示例值:
{{appId}}
account
string
可选
示例值:
19999999999
Body 参数application/json
liveRoomId
integer
直播间id
sessionId
string
直播间标识
addAudioRequests
array [object {4}]
要添加的话术列表
liveMaterialLibraryId
integer
音频素材id
liveMaterialTextId
integer
文本素材id
content
string
tts文本
url
string
音频连接
sceneId
string
必需
audioId
string
可选
示例
{
"addAudioRequests": [
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"url": "https://digital-person-daily.oss-cn-hangzhou.aliyuncs.com/live/81/common_media/audio/1692789707137结束.MP3",
"liveMaterialLibraryId": 7890
}
],
"sceneId": "656e8ed2b0f474795c346137",
"liveRoomId": 2111,
"audioId": "audio_000_7890",
"sessionId": "liveSessionCreatedStr_81_2111"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/openApiDigitalPerson/liveProcess/addAudioList' \
--header 'authorization: {{auth|md5}}' \
--header 'req_from: C' \
--header 'timestamp: {{timestamp}}' \
--header 'app_id: {{appId}}' \
--header 'account: 19999999999' \
--header 'Content-Type: application/json' \
--data-raw '{
"addAudioRequests": [
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"content": "测试openapi插入",
"liveMaterialTextId": 34216103
},
{
"url": "https://digital-person-daily.oss-cn-hangzhou.aliyuncs.com/live/81/common_media/audio/1692789707137结束.MP3",
"liveMaterialLibraryId": 7890
}
],
"sceneId": "656e8ed2b0f474795c346137",
"liveRoomId": 2111,
"audioId": "audio_000_7890",
"sessionId": "liveSessionCreatedStr_81_2111"
}'
返回响应
🟢200成功
application/json
Body
code
integer
可选
默认值:
CommonErrorCode.SUCCESS.getCode()
data
object (LiveRoomVO)
返回的数据
goodsList
array[object (LiveGoodsLibraryVO) {12}]
商品列表
liveRuleList
array[object (LiveRulePO) {16}]
互动规则
guideGoodsList
array[object (GuideGoodsPO) {27}]
商品导购
liveRoomConfig
object (LiveRoomConfigPO)
全局配置
logId
string
可选
instanceTitle
string
可选
liveRoomId
integer
自增主键
name
string
直播间名
avatar
string
封面
status
enum<string>
状态
枚举值:
LIVINGTOLIVE
lastLiveTime
string
可选
enabledStatus
integer
可选
liveDuration
integer
直播时长
streamUrl
string
拉流地址
pushUrl
string
推流地址
rtsUrl
string
RTS推流地址
rtmpUrl
string
RTMP推流地址
livePushUrl
string
直播间推流地址
pushSecret
string
推流密钥
userId
integer
可选
livingScene
string
当前直播的场景
livingAudio
string
当前直播的话术
sessionId
string
可选
isChat
boolean
是否开启聊天互动
loopType
enum<string>
循环方式
枚举值:
SINGLE_LOOPALL_LOOPRANDOM
instanceIp
string
实例运行所在机器
algIp
string
算法GPU服务器
createTime
string
可选
updateTime
string
更新时间
ifTemplate
integer
可选
firstFrameUrl
string
直播视频首帧图
requestId
string
请求唯一标记
resultMsg
string
提示信息
默认值:
CommonErrorCode.SUCCESS.getDesc()
host
string
业务主机名
默认值:
getHostName()
errorStackTrace
string
异常堆栈
示例
{
"code": 0,
"data": {
"goodsList": [
{
"liveScenePOList": [
{
"id": "",
"liveRoomId": 0,
"liveGoodsLibraryId": 0,
"isHide": false,
"name": "",
"orderBy": 0,
"createTime": "",
"updateTime": "",
"voice": "",
"speed": 0,
"volume": 0,
"duration": 0,
"lang": "",
"role": "",
"customizeVersion": 0,
"style": "",
"sourceType": 0,
"audioAssetsType": "",
"dialogFlowList": [
{
"duration": 0,
"url": "",
"orderBy": 0,
"featureUrl": "",
"materialName": "",
"audioId": "",
"wavPath": "",
"ruleId": "",
"guideMaterialLibraryId": 0,
"guideMaterialAvatar": "",
"guideGoodsId": "",
"audioUrl": "",
"replyType": "",
"materialTextUrlBOList": [
{
"audioId": "",
"liveSceneId": "",
"url": "",
"featureUrl": "",
"duration": 0,
"text": "",
"fileName": ""
}
],
"liveMaterialTextId": 0,
"liveGoodsLibraryId": 0,
"txtContent": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0,
"materialUrl": "",
"txtShow": "",
"liveMaterialLibraryId": 0
}
],
"ruleFlowList": [
{
"duration": 0,
"url": "",
"orderBy": 0,
"featureUrl": "",
"materialName": "",
"audioId": "",
"wavPath": "",
"ruleId": "",
"guideMaterialLibraryId": 0,
"guideMaterialAvatar": "",
"guideGoodsId": "",
"audioUrl": "",
"replyType": "",
"materialTextUrlBOList": [
{
"audioId": "",
"liveSceneId": "",
"url": "",
"featureUrl": "",
"duration": 0,
"text": "",
"fileName": ""
}
],
"liveMaterialTextId": 0,
"liveGoodsLibraryId": 0,
"txtContent": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0,
"materialUrl": "",
"txtShow": "",
"liveMaterialLibraryId": 0
}
],
"materialList": [
{
"x": 0,
"y": 0,
"z": 0,
"width": 0,
"height": 0,
"avatar": "",
"frameWidth": 0,
"frameHeight": 0,
"blur": 0,
"blurUrl": "",
"originUrl": "",
"liveMaterialLibraryId": 0,
"materialName": "",
"materialType": 0,
"libraryType": 0,
"liveGoodsLibraryId": 0,
"materialUrl": "",
"vTime": 0,
"materialSize": 0,
"vFeatureUrl": "",
"enableMatting": 0,
"t0": 0,
"t1": 0,
"k": 0,
"middleMattingUrl": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0
}
],
"liveDigitalPersonAssetsList": [
{
"x": 0,
"y": 0,
"z": 0,
"width": 0,
"height": 0,
"frameWidth": 0,
"frameHeight": 0,
"ali_green": false,
"digitalPersonAssetsId": 0,
"name": "",
"avatar": "",
"squareAvatar": "",
"previewUrl": "",
"generalPreviewUrl": "",
"userId": 0,
"templateId": "",
"liveTemplateId": "",
"status": "",
"type": "",
"isUse": false,
"price": 0,
"isAutoMatting": false,
"thres": 0,
"mattingUrl": "",
"createTime": "",
"updateTime": "",
"hot": 0,
"tagType": 0,
"description": "",
"t0": 0,
"t1": 0,
"k": 0,
"isMatting": false,
"useStatus": 0,
"trainFailContent": "",
"trainStartTime": "",
"trainEndTime": "",
"reviewPassTime": "",
"squeezeUrl": "",
"templateValidLength": 0,
"autoValidEnd": false,
"videoDuration": 0,
"trainAudioUrl": "",
"agentUserId": 0,
"rangeEnabled": 0,
"xrangeStartRatio": 0,
"xrangeEndRatio": 0,
"yrangeStartRatio": 0,
"yrangeEndRatio": 0,
"startFrameAvatar": "",
"expireDate": "",
"aliGreen": false,
"scenesType": 0
}
],
"backGroundImage": {
"frameWidth": 0,
"frameHeight": 0,
"blur": 0,
"blurUrl": "",
"originUrl": "",
"backgroundId": 0,
"userId": 0,
"categorizeId": 0,
"name": "",
"materialSize": 0,
"recentUsageTime": 0,
"isBuilt": 0,
"enabledStatus": 0,
"url": "",
"createTime": "",
"updateTime": ""
}
}
],
"goodsCategoryName": "",
"liveGoodsLibraryId": 0,
"goodsName": "",
"goodsDescribe": "",
"categoryCode": 0,
"coverImageUrl": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0
}
],
"liveRuleList": [
{
"id": "",
"liveRoomId": 0,
"type": "",
"isUse": false,
"thres": 0,
"keys": [
""
],
"corpusList": [
{
"duration": 0,
"url": "",
"orderBy": 0,
"featureUrl": "",
"materialName": "",
"audioId": "",
"wavPath": "",
"ruleId": "",
"guideMaterialLibraryId": 0,
"guideMaterialAvatar": "",
"guideGoodsId": "",
"audioUrl": "",
"replyType": "",
"materialTextUrlBOList": [
{
"audioId": "",
"liveSceneId": "",
"url": "",
"featureUrl": "",
"duration": 0,
"text": "",
"fileName": ""
}
],
"liveMaterialTextId": 0,
"liveGoodsLibraryId": 0,
"txtContent": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0,
"materialUrl": "",
"txtShow": "",
"liveMaterialLibraryId": 0
}
],
"replyType": "",
"replySource": "",
"liveGoodsLibraryIds": [
0
],
"enableScope": 0
}
],
"guideGoodsList": [
{
"id": "",
"liveRoomId": 0,
"liveMaterialLibraryId": 0,
"liveGoodsLibraryId": 0,
"materialName": "",
"materialUrl": "",
"cover": "",
"materialDuration": 0,
"enableScope": 0,
"liveGoodsLibraryIds": [
0
],
"enableMatting": 0,
"t0": 0,
"t1": 0,
"k": 0,
"middleMattingUrl": "",
"guideRuleList": [
{
"ruleId": "",
"type": "",
"keys": [
""
],
"thres": 0
}
],
"corpusList": [
{
"duration": 0,
"url": "",
"orderBy": 0,
"featureUrl": "",
"materialName": "",
"audioId": "",
"wavPath": "",
"ruleId": "",
"guideMaterialLibraryId": 0,
"guideMaterialAvatar": "",
"guideGoodsId": "",
"audioUrl": "",
"replyType": "",
"materialTextUrlBOList": [
{
"audioId": "",
"liveSceneId": "",
"url": "",
"featureUrl": "",
"duration": 0,
"text": "",
"fileName": ""
}
],
"liveMaterialTextId": 0,
"liveGoodsLibraryId": 0,
"txtContent": "",
"createUserId": 0,
"updateUserId": 0,
"createTime": "",
"updateTime": "",
"enabledStatus": 0,
"materialUrl": "",
"txtShow": "",
"liveMaterialLibraryId": 0
}
],
"replySource": "",
"replyType": ""
}
],
"liveRoomConfig": {
"id": "",
"liveRoomId": 0,
"type": "",
"url": "",
"minute": 0,
"thres": 0,
"volume": 0,
"liveType": "",
"lang": "",
"role": "",
"style": "",
"sourceType": 0,
"voice": "",
"speed": 0,
"ttsVolume": 0,
"interrupt": false,
"audioAssetsType": ""
},
"logId": "",
"instanceTitle": "",
"liveRoomId": 0,
"name": "",
"avatar": "",
"status": "",
"lastLiveTime": "",
"enabledStatus": 0,
"liveDuration": 0,
"streamUrl": "",
"pushUrl": "",
"rtsUrl": "",
"rtmpUrl": "",
"livePushUrl": "",
"pushSecret": "",
"userId": 0,
"livingScene": "",
"livingAudio": "",
"sessionId": "",
"isChat": false,
"loopType": "",
"instanceIp": "",
"algIp": "",
"createTime": "",
"updateTime": "",
"ifTemplate": 0,
"firstFrameUrl": ""
},
"requestId": "",
"resultMsg": "",
"host": "",
"errorStackTrace": ""
}
修改于 2024-07-22 06:58:37