alicloud-ai-audio-cosyvoice-voice-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCategory: 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(voice-enrollment),通过自然语言语音描述创建定制语音。
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中添加~/.alibabacloud/credentials。dashscope_api_key
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/alicloud-ai-audio-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/alicloud-ai-audio-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/alicloud-ai-audio-cosyvoice-voice-design
for f in skills/ai/audio/alicloud-ai-audio-cosyvoice-voice-design/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-ai-audio-cosyvoice-voice-design/validate.txtPass criteria: command exits 0 and is generated.
output/alicloud-ai-audio-cosyvoice-voice-design/validate.txtbash
mkdir -p output/alicloud-ai-audio-cosyvoice-voice-design
for f in skills/ai/audio/alicloud-ai-audio-cosyvoice-voice-design/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-ai-audio-cosyvoice-voice-design/validate.txt验证通过标准:命令执行退出码为0,且生成文件。
output/alicloud-ai-audio-cosyvoice-voice-design/validate.txtOutput And Evidence
输出与证据
- Save artifacts, command outputs, and API response summaries under .
output/alicloud-ai-audio-cosyvoice-voice-design/ - Include ,
target_model,prefix, andvoice_promptin the evidence file.preview_text
- 将生成的产物、命令输出及API响应摘要保存至目录下。
output/alicloud-ai-audio-cosyvoice-voice-design/ - 证据文件中需包含、
target_model、prefix和voice_prompt信息。preview_text
References
参考资料
references/api_reference.mdreferences/sources.md
references/api_reference.mdreferences/sources.md