对话机器人服务 CBS-配置视频:请求参数

时间:2024-05-10 17:02:37

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

tts_config

TtsConfig object

音频配置。

video_config

VideoConfig object

背景配置。 如果为空,使用默认背景。

character_config

CharacterConfig object

形象设置。

read_config

ReadConfig object

播报配置。

表3 TtsConfig

参数

是否必选

参数类型

描述

property

String

用于设置音色。取值范围:

  • chinese_huaxiaomei_common:华小美(温柔女声)
  • chinese_huaxiaolu_common:华小璐(知性女声)
  • chinese_huaxiaoru_common:华小汝(中英女声)
  • chinese_huaxiaohan_common:华小涵(中英女声)
  • chinese_huaxiaozhen_common:华小珍(中英女声)
  • chinese_huaxiaoxia_common:华小夏(热情女声)
  • chinese_huaxiaowen_common:华小雯(柔美女声)
  • chinese_huaxiaoshu_common:华小舒(舒缓女声)
  • chinese_huaxiaowei_common:华小唯(嗲柔女声)
  • chinese_huaxiaoliang_common:华小靓(嘹亮女声)
  • chinese_huaxiaoyan_common:华小颜(严厉女声)
  • chinese_huaxiaoxuan_common:华小萱(台湾女声)
  • chinese_huanvxia_literature:华女侠(武侠女声)
  • chinese_huaxiaomin_common:华小闽(闽南女声)
  • chinese_xiaoqi_common:小琪(标准女声)
  • chinese_xiaoyan_common:小燕(温柔女声)
  • chinese_xiaowen_common:小雯(柔美女声)
  • chinese_xiaojing_common:小靖(俏皮女声)
  • chinese_xiaoxia_common:小夏(热情女声)
  • chinese_xiaoqian_common:小倩(成熟女声)
  • english_cameal_common:cameal(英文女声)
  • aixia:小霞(亲和女声)
  • zhiqian:知倩(资讯女声)
  • ava:ava(美语女声)
  • luna:Luna(英音女声)
  • emily:Emily(英音女声)
  • chinese_huaxiaogang_common:华晓刚(利落男声)
  • chinese_huaxiaodong_common:华晓东(成熟男声)
  • chinese_huaxiaoning_common:华小宁(中英男声)
  • chinese_huaxiaoyang_common:华晓阳(朝气男声)
  • chinese_huaxiaoxuan_literature:华晓悬(悬疑男声)
  • chinese_xiaoyu_common:小宇(标准男声)
  • chinese_xiaosong_common:小宋(激昂男声)
  • aide:小德(新闻男声)
  • aishu:小舒(资讯男声)
  • yaqun:小群(卖场广播)
  • luca:Luca(英音男声)
  • eric:Eric(英音男声)
    说明:

    如果有自定义的音色,也可以配置为自定义的取值。

speed

Float

用户设置音速。

volume

Integer

用于设置音量。

delay

Float

段首停顿时间。

取值范围:0~60。

单位:秒。

默认值:0。

pitch

String

音高。

取值范围: -500~500。

默认值:0。

audio_format

String

语音格式头:wav、mp3、pcm。

默认:wav。

sample_rate

String

采样率:16000、8000。

默认值:8000。

tts_source

Integer

tts来源。

  • 0:huawei
  • 1:ali
  • 2:用户克隆声音

默认值:0。

表4 VideoConfig

参数

是否必选

参数类型

描述

background_id

String

背景id。可通过调用获取图片列表接口获取。

logo_id

String

图标id。可通过调用获取图片列表接口获取。

show_subtitles

Boolean

是否显示字幕。默认值:false。

resolution_type

Integer

画面分辨率。

  • 0:宽屏landscape(默认)
  • 1:竖屏portrait
表5 CharacterConfig

参数

是否必选

参数类型

描述

character_id

String

形象id。可通过调用获取形象列表接口获取。

position

Position object

位置坐标。

表6 Position

参数

是否必选

参数类型

描述

x

Integer

像素坐标x。

y

Integer

像素坐标x。

表7 ReadConfig

参数

是否必选

参数类型

描述

image_read_configs

Array of ImageReadConfig objects

插图播报配置。

read_type

Integer

播报选项。

  • 0:纯文本播报(使用read_content 字段)。
  • 1:插图播报(使用image_read_configs字段)。
  • 3:自定义音频播报(使用audio字段) 会根据选项进行具体的字段校验。

read_content

String

纯文本播报内容。长度为1-2500。

character_position

Integer

主播位置。

  • 0:左
  • 1:中
  • 2:右

默认值:1。

read_content_paragraph_interval

Integer

段落播报间隔。

单位:ms。

取值范围:0~5000。

默认值:400。

image_frame_id

String

播报框id。可通过调用获取图片列表接口获取。

audio_url

String

用户的音频文件obs地址,为https格式(如:https://cbs-digital-human-cn-north-4.obs.myhuaweicloud.com:443/audio.wav)。当字段不为空时,表示将使用用户自己的音频文件。 不支持PPT和图片播报,不支持字幕。音频格式文件的格式为wav,音频最长支持20分钟,支持100M。该功能的使用需要用户启动OBS授权。

表8 ImageReadConfig

参数

是否必选

参数类型

描述

read_content

String

播报内容,长度为1~2500。

image_id

String

图片id。可通过调用获取图片列表接口获取。

resolution

Resolution object

图片显示像素(748*420)。

表9 Resolution

参数

是否必选

参数类型

描述

x

Integer

像素x。

y

Integer

像素y。

support.huaweicloud.com/api-cbs/cbs_03_0135.html