Appearance
常见问题
如何改变机器人形象尺寸?
请配置 options.rootClass 字段并自行使用 css 覆盖 SDK 内部元素样式。
提示
- 因版本迭代,内部样式选择器可能发生改变,请以实际选择器为准。
- 请监听
winVisibleChange事件,在聊天窗口可见性变化时及时调整您的自定义尺寸,防止聊天窗口无法正常展示。
html
<script>
const options = {
// 省略其他配置项...
rootClass: "your-class-name";
}
CxRobotSdkJs.init(options).then((robot) => {
console.log(robot);
});
</script>
<style>
// 覆盖形象样式
.your-class-name .figure-wrapper {
width: 100px !important;
height: 100px !important;
}
// 覆盖卡通交互形象语音朗读控制按钮样式
.your-class-name .cx-vbot-control .speaker-control {
width: 20px !important;
height: 20px !important;
}
// 覆盖卡通交互形象语音识别按钮样式
.your-class-name .cx-vbot-control .asr-control {
width: 20px !important;
height: 20px !important;
}
// 同时覆盖卡通交互形象所有控制按钮样式
.your-class-name .cx-vbot-control > * {
width: 20px !important;
height: 20px !important;
}
// 覆盖通知消息样式
.your-class-name .notify-wrapper {
background: #d33332;
color: #fff;
}
</style>为什么不能朗读内容?
- 请检查
options.useToonFigure是否为0, 若为0则不使用卡通形象,无法朗读,请将options.useToonFigure设置为1。 - 请检查页面控制台是否存在报错,若存在下图报错则 TTS 服务欠费异常,请联系智能体开发团队。

为什么不能语音唤醒
请检查 options.asr 是否为 0, 若为 0 则不使用语音唤醒,请将 options.asr 设置为 1。
如何修改唤醒词?
请配置 options.wakeword 字段,具体请参考配置文档。
唤醒词识别不准确怎么办?
请在 options.wakewordAuxs 添加读音相近的唤醒词,具体请参考配置文档。