aliyun-cosyvoice-voice-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCategory: provider
Category: provider
Model Studio CosyVoice Voice Design
Model Studio CosyVoice 音色设计
Use the CosyVoice voice enrollment API to create designed voices from a natural-language voice description.
使用CosyVoice音色录入API,通过自然语言音色描述创建自定义设计的音色。
Critical model names
关键模型名称
Use and one of these values:
model="voice-enrollment"target_modelcosyvoice-v3.5-pluscosyvoice-v3.5-flashcosyvoice-v3-pluscosyvoice-v3-flash
Recommended default in this repo:
target_model="cosyvoice-v3.5-plus"
使用 以及以下任意一个 值:
model="voice-enrollment"target_modelcosyvoice-v3.5-pluscosyvoice-v3.5-flashcosyvoice-v3-pluscosyvoice-v3-flash
本仓库推荐的默认值:
target_model="cosyvoice-v3.5-plus"
Region and compatibility
区域与兼容性
- and
cosyvoice-v3.5-plusare available only in China mainland deployment mode (Beijing endpoint).cosyvoice-v3.5-flash - In international deployment mode (Singapore endpoint), and
cosyvoice-v3-plusdo not support voice clone/design.cosyvoice-v3-flash - The must match the later speech synthesis model.
target_model
- 和
cosyvoice-v3.5-plus仅在中国大陆部署模式(北京节点)可用。cosyvoice-v3.5-flash - 在国际部署模式(新加坡节点)下,和
cosyvoice-v3-plus不支持音色克隆/设计功能。cosyvoice-v3-flash - 必须与后续使用的语音合成模型相匹配。
target_model
Endpoint
接口地址
- Domestic:
https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization - International:
https://dashscope-intl.aliyuncs.com/api/v1/services/audio/tts/customization
- 国内:
https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization - 国际:
https://dashscope-intl.aliyuncs.com/api/v1/services/audio/tts/customization
Prerequisites
前置条件
- Set in your environment, or add
DASHSCOPE_API_KEYtodashscope_api_key.~/.alibabacloud/credentials
- 在你的环境变量中设置,或者将
DASHSCOPE_API_KEY添加到dashscope_api_key文件中。~/.alibabacloud/credentials
Normalized interface (cosyvoice.voice_design)
标准化接口 (cosyvoice.voice_design)
Request
请求参数
- (string, optional): fixed to
modelvoice-enrollment - (string, optional): default
target_modelcosyvoice-v3.5-plus - (string, required): letters/digits only, max 10 chars
prefix - (string, required): max 500 chars, Chinese or English only
voice_prompt - (string, required): max 200 chars, Chinese or English
preview_text - (array[string], optional):
language_hintsorzh, and should matchenpreview_text - (int, optional): e.g.
sample_rate24000 - (string, optional): e.g.
response_formatwav
- (字符串, 可选):固定为
modelvoice-enrollment - (字符串, 可选):默认值为
target_modelcosyvoice-v3.5-plus - (字符串, 必填):仅支持字母/数字,最长10个字符
prefix - (字符串, 必填):最长500个字符,仅支持中文或英文
voice_prompt - (字符串, 必填):最长200个字符,支持中文或英文
preview_text - (字符串数组, 可选):可选值为
language_hints或zh,需要与en的语言匹配preview_text - (整数, 可选):例如
sample_rate24000 - (字符串, 可选):例如
response_formatwav
Response
返回参数
- (string)
voice_id - (string)
request_id - (string, optional)
status
- (字符串)
voice_id - (字符串)
request_id - (字符串, 可选)
status
Operational guidance
操作指引
- Keep concrete: timbre, age range, pace, emotion, articulation, and scenario.
voice_prompt - If is used, it should match the language of
language_hints.preview_text - Designed voice names include a marker in the generated backend naming convention.
-vd-
- 的描述要具体:包括音色、年龄范围、语速、情绪、咬字清晰度和使用场景等信息。
voice_prompt - 如果使用了,其取值需要与
language_hints的语言匹配。preview_text - 设计生成的音色名称在后端命名规则中会包含标识。
-vd-
Local helper script
本地辅助脚本
Prepare a normalized request JSON:
bash
python skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/prepare_cosyvoice_design_request.py \
--target-model cosyvoice-v3.5-plus \
--prefix announcer \
--voice-prompt "沉稳的中年男性播音员,低沉有磁性,语速平稳,吐字清晰。" \
--preview-text "各位听众朋友,大家好,欢迎收听晚间新闻。" \
--language-hint zh准备标准化的请求JSON:
bash
python skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/prepare_cosyvoice_design_request.py \
--target-model cosyvoice-v3.5-plus \
--prefix announcer \
--voice-prompt "沉稳的中年男性播音员,低沉有磁性,语速平稳,吐字清晰。" \
--preview-text "各位听众朋友,大家好,欢迎收听晚间新闻。" \
--language-hint zhValidation
校验
bash
mkdir -p output/aliyun-cosyvoice-voice-design
for f in skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-cosyvoice-voice-design/validate.txtPass criteria: command exits 0 and is generated.
output/aliyun-cosyvoice-voice-design/validate.txtbash
mkdir -p output/aliyun-cosyvoice-voice-design
for f in skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-cosyvoice-voice-design/validate.txt通过标准:命令退出码为0,且生成了文件。
output/aliyun-cosyvoice-voice-design/validate.txtOutput And Evidence
输出与凭证
- Save artifacts, command outputs, and API response summaries under .
output/aliyun-cosyvoice-voice-design/ - Include ,
target_model,prefix, andvoice_promptin the evidence file.preview_text
- 将产物、命令输出和API响应摘要保存在目录下。
output/aliyun-cosyvoice-voice-design/ - 凭证文件中需要包含、
target_model、prefix和voice_prompt信息。preview_text
References
参考文档
references/api_reference.mdreferences/sources.md
references/api_reference.mdreferences/sources.md