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 model="voice-enrollment" and one of these target_model values:
cosyvoice-v3.5-plus
cosyvoice-v3.5-flash
cosyvoice-v3-plus
cosyvoice-v3-flash
Recommended default in this repo:
target_model="cosyvoice-v3.5-plus"
Region and compatibility
cosyvoice-v3.5-plus and cosyvoice-v3.5-flash are available only in China mainland deployment mode (Beijing endpoint).
- In international deployment mode (Singapore endpoint),
cosyvoice-v3-plus and cosyvoice-v3-flash do not support voice clone/design.
- The
target_model must match the later speech synthesis 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
DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials.
Normalized interface (cosyvoice.voice_design)
Request
model (string, optional): fixed to voice-enrollment
target_model (string, optional): default cosyvoice-v3.5-plus
prefix (string, required): letters/digits only, max 10 chars
voice_prompt (string, required): max 500 chars, Chinese or English only
preview_text (string, required): max 200 chars, Chinese or English
language_hints (array[string], optional): zh or en, and should match preview_text
sample_rate (int, optional): e.g. 24000
response_format (string, optional): e.g. wav
Response
voice_id (string)
request_id (string)
status (string, optional)
Operational guidance
- Keep
voice_prompt concrete: timbre, age range, pace, emotion, articulation, and scenario.
- If
language_hints is used, it should match the language of preview_text.
- Designed voice names include a
-vd- marker in the generated backend naming convention.
Local helper script
Prepare a normalized request JSON:
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
Validation
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
Pass criteria: command exits 0 and output/aliyun-cosyvoice-voice-design/validate.txt is generated.
Output And Evidence
- Save artifacts, command outputs, and API response summaries under
output/aliyun-cosyvoice-voice-design/.
- Include
target_model, prefix, voice_prompt, and preview_text in the evidence file.
References
references/api_reference.md
references/sources.md
1---
2name: aliyun-cosyvoice-voice-design
3description: 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.
4version: 1.0.0
5---
6
7Category: provider
8
9# Model Studio CosyVoice Voice Design
10
11Use the CosyVoice voice enrollment API to create designed voices from a natural-language voice description.
12
13## Critical model names
14
15Use `model="voice-enrollment"` and one of these `target_model` values:
16- `cosyvoice-v3.5-plus`
17- `cosyvoice-v3.5-flash`
18- `cosyvoice-v3-plus`
19- `cosyvoice-v3-flash`
20
21Recommended default in this repo:
22- `target_model="cosyvoice-v3.5-plus"`
23
24## Region and compatibility
25
26- `cosyvoice-v3.5-plus` and `cosyvoice-v3.5-flash` are available only in China mainland deployment mode (Beijing endpoint).
27- In international deployment mode (Singapore endpoint), `cosyvoice-v3-plus` and `cosyvoice-v3-flash` do not support voice clone/design.
28- The `target_model` must match the later speech synthesis model.
29
30## Endpoint
31
32- Domestic: `https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization`
33- International: `https://dashscope-intl.aliyuncs.com/api/v1/services/audio/tts/customization`
34
35## Prerequisites
36
37- Set `DASHSCOPE_API_KEY` in your environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials`.
38
39## Normalized interface (cosyvoice.voice_design)
40
41### Request
42- `model` (string, optional): fixed to `voice-enrollment`
43- `target_model` (string, optional): default `cosyvoice-v3.5-plus`
44- `prefix` (string, required): letters/digits only, max 10 chars
45- `voice_prompt` (string, required): max 500 chars, Chinese or English only
46- `preview_text` (string, required): max 200 chars, Chinese or English
47- `language_hints` (array[string], optional): `zh` or `en`, and should match `preview_text`
48- `sample_rate` (int, optional): e.g. `24000`
49- `response_format` (string, optional): e.g. `wav`
50
51### Response
52- `voice_id` (string)
53- `request_id` (string)
54- `status` (string, optional)
55
56## Operational guidance
57
58- Keep `voice_prompt` concrete: timbre, age range, pace, emotion, articulation, and scenario.
59- If `language_hints` is used, it should match the language of `preview_text`.
60- Designed voice names include a `-vd-` marker in the generated backend naming convention.
61
62## Local helper script
63
64Prepare a normalized request JSON:
65
66```bash
67python skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/prepare_cosyvoice_design_request.py \
68 --target-model cosyvoice-v3.5-plus \
69 --prefix announcer \
70 --voice-prompt "沉稳的中年男性播音员,低沉有磁性,语速平稳,吐字清晰。" \
71 --preview-text "各位听众朋友,大家好,欢迎收听晚间新闻。" \
72 --language-hint zh
73```
74
75## Validation
76
77```bash
78mkdir -p output/aliyun-cosyvoice-voice-design
79for f in skills/ai/audio/aliyun-cosyvoice-voice-design/scripts/*.py; do
80 python3 -m py_compile "$f"
81done
82echo "py_compile_ok" > output/aliyun-cosyvoice-voice-design/validate.txt
83```
84
85Pass criteria: command exits 0 and `output/aliyun-cosyvoice-voice-design/validate.txt` is generated.
86
87## Output And Evidence
88
89- Save artifacts, command outputs, and API response summaries under `output/aliyun-cosyvoice-voice-design/`.
90- Include `target_model`, `prefix`, `voice_prompt`, and `preview_text` in the evidence file.
91
92## References
93
94- `references/api_reference.md`
95- `references/sources.md`