Skip to content

自定义音色

添加自定义音色

  1. 请求链接: /api/customTimbre/add

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
nameStringY"我的音色"音色名称
voice_urlStringY"https://example.com/voice.mp3"录制的语音mp3文件地址
  1. 返回参数及示例:
参数类型描述
errorCodeInt错误码
descriptionString描述信息
errorMsgString错误信息
dataObject返回数据
  errcodeInt错误码
  errmsgString错误信息
  descriptionString描述信息
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {
    "errcode": 0,
    "errmsg": "none error message",
    "description": "表示成功或是。"
  }
}

删除自定义音色

  1. 请求链接: /api/customTimbre/delete

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
voice_idIntY1语音ID
  1. 返回参数及示例:
参数类型描述
errorCodeInt错误码
descriptionString描述信息
errorMsgString错误信息
dataObject返回数据
  errcodeInt错误码
  errmsgString错误信息
  descriptionString描述信息
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {
    "errcode": 0,
    "errmsg": "none error message",
    "description": "表示成功或是。"
  }
}

获取自定义音色列表

  1. 请求链接: /api/customTimbre/list

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
page_noIntY1页码
page_sizeIntY20每页条数
  1. 返回参数及示例:
参数类型描述
errorCodeInt错误码
descriptionString描述信息
errorMsgString错误信息
dataObject返回数据
  listArray音色列表
    voice_idInt语音ID
    nameString语音名称
    statusInt音色状态 0:排队中 1:待审核 2:审核通过 3:审核失败 4:已失效
  page_noInt页码
  page_sizeInt每页条数
  totalInt总数
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": {
    "list": [
      {
        "voice_id": 1,
        "name": "语音1",
        "status": 0
      }
    ],
    "page_no": 1,
    "page_size": 20,
    "total": 1
  }
}

获取可用自定义音色

  1. 请求链接: /api/customTimbre/getAvailableCustomTimbres

  2. 请求方式: POST

  3. 参数说明:

名称类型是否必需示例描述
  1. 返回参数及示例:
参数类型描述
errorCodeInt错误码
descriptionString描述信息
errorMsgString错误信息
dataArray可用音色列表
  timbre_idInt音色ID
  nameString音色名称
  statusInt音色状态 0:排队中 1:待审核 2:审核通过 3:审核失败 4:已失效
json
{
  "errorCode": 0,
  "description": "success",
  "errorMsg": "success",
  "data": [
    {
      "timbre_id": 1,
      "name": "自定义音色",
      "status": 2
    }
  ]
}

鑫泓佳智能硬件通信协议文档