Skip to main content
POST
/
paas
/
v4
/
voice
/
clone
音色复刻
curl --request POST \
  --url https://open.bigmodel.cn/api/paas/v4/voice/clone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "cogtts-clone",
  "voice_name": "my_custom_voice_001",
  "text": "你好,这是一段示例音频的文本内容,用于音色复刻参考。",
  "input": "欢迎使用我们的音色复刻服务,这将生成与示例音频相同音色的语音。",
  "file_id": "file_abc123def456ghi789",
  "request_id": "voice_clone_req_001"
}'
{
  "voice": "voice_clone_20240315_143052_001",
  "file_id": "file_xyz789abc456def123",
  "file_purpose": "voice-clone-output",
  "request_id": "voice_clone_req_20240315_143052_001"
}

Authorizations

Authorization
string
header
required

使用以下格式进行身份验证:Bearer <your api key>

Body

application/json
model
string
required

模型

Example:

"cogtts-clone"

voice_name
string
required

指定唯一的音色名称

Example:

"my_custom_voice_001"

input
string
required

生成试听音频的目标文本内容

Example:

"欢迎使用我们的音色复刻服务,这将生成与示例音频相同音色的语音。"

file_id
string
required

示例音频的file_id,通过文件接口上传获取

Example:

"file_abc123def456ghi789"

text
string

示例音频的文本内容,选填

Example:

"你好,这是一段示例音频的文本内容,用于音色复刻参考。"

request_id
string

由用户端传递,需要唯一;用于区分每次请求的唯一标识符。如果用户端未提供,平台将默认生成。

Example:

"voice_clone_req_001"

Response

业务处理成功

voice
string

音色

Example:

"voice_clone_20240315_143052_001"

file_id
string

音频试听文件ID

Example:

"file_xyz789abc456def123"

file_purpose
string

文件 purpose,固定为voice-clone-output

Example:

"voice-clone-output"

request_id
string

请求 ID

Example:

"voice_clone_req_20240315_143052_001"

I