aliyun-cosyvoice-voice-design
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Use when designing custom voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or cosyvoice-v3.5-flash, from a voice prompt plus preview text before using the returned voice_id in TTS.
13installs
Sourcecinience/alicloud-skills
Added on
NPX Install
npx skill4agent add cinience/alicloud-skills aliyun-cosyvoice-voice-designTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Category: provider
Model Studio CosyVoice Voice Design
Use the CosyVoice voice enrollment API to create designed voices from a natural-language voice description.
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"
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
Endpoint
- Domestic:
https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization - International:
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
Normalized interface (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
Response
- (string)
voice_id - (string)
request_id - (string, optional)
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-
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 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.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
References
references/api_reference.mdreferences/sources.md