Appearance
设置人声的变声特效
说明
通过该接口您可以设置人声的变声特效,设置的效果在退出房间后会自动失效,如果下次进房还需要对应特效,需要调用此接口再次进行设置。
方法名
setVoiceChangerType
用法
- 用法如下:
js
module.setVoiceChangerType({
params:{
},
//成功执行的函数
success: (res) => {
let data = res.data;
console.log(data)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
complete: (res) => {
// console.log(res)
}
})js
module.setVoiceChangerType({
params:{
},
//成功执行的函数
success: (res) => {
const data = res.data;
console.log(data)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
// complete: (res) => {
// console.log(res)
// }
} as LevenOptions)- 参数说明
参数名 参数类型 是否必填 默认值 参数描述 params Object 是 无 参数配置 params.type String 是 无 变声特效类型,可选值请参考:【变声特效类型】 success Function 否 无 执行成功的函数 fail Function 否 无 执行失败的函数 complete Function 否 无 执行完成的函数,不管成功还是失败都会执行
变声特效类型
| 名称 | 描述 |
|---|---|
| TXLiveVoiceChangerType_0 | 关闭 |
| TXLiveVoiceChangerType_1 | 熊孩子 |
| TXLiveVoiceChangerType_2 | 萝莉 |
| TXLiveVoiceChangerType_3 | 大叔 |
| TXLiveVoiceChangerType_4 | 重金属 |
| TXLiveVoiceChangerType_5 | 感冒 |
| TXLiveVoiceChangerType_6 | 外语腔 |
| TXLiveVoiceChangerType_7 | 困兽 |
| TXLiveVoiceChangerType_8 | 肥宅 |
| TXLiveVoiceChangerType_9 | 强电流 |
| TXLiveVoiceChangerType_10 | 重机械 |
| TXLiveVoiceChangerType_11 | 空灵 |
| TXLiveVoiceChangerType_12 | 猪八戒 |
| TXLiveVoiceChangerType_13 | 绿巨人 |
回调
- 示例
json
{
"data": {},
"message": "",
"code": 0
}- 回调说明:
参数名 参数类型 参数描述 message String 消息提示 data Object 数据对象 code Integer 返回类型,0.成功,其他:失败
