Install
openclaw skills install aliyun-cosyvoice-voice-designUse 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.
openclaw skills install aliyun-cosyvoice-voice-designCategory: provider
Use the CosyVoice voice enrollment API to create designed voices from a natural-language voice description.
Use model="voice-enrollment" and one of these target_model values:
cosyvoice-v3.5-pluscosyvoice-v3.5-flashcosyvoice-v3-pluscosyvoice-v3-flashRecommended default in this repo:
target_model="cosyvoice-v3.5-plus"cosyvoice-v3.5-plus and cosyvoice-v3.5-flash are available only in China mainland deployment mode (Beijing endpoint).cosyvoice-v3-plus and cosyvoice-v3-flash do not support voice clone/design.target_model must match the later speech synthesis model.https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customizationhttps://dashscope-intl.aliyuncs.com/api/v1/services/audio/tts/customizationDASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials.model (string, optional): fixed to voice-enrollmenttarget_model (string, optional): default cosyvoice-v3.5-plusprefix (string, required): letters/digits only, max 10 charsvoice_prompt (string, required): max 500 chars, Chinese or English onlypreview_text (string, required): max 200 chars, Chinese or Englishlanguage_hints (array[string], optional): zh or en, and should match preview_textsample_rate (int, optional): e.g. 24000response_format (string, optional): e.g. wavvoice_id (string)request_id (string)status (string, optional)voice_prompt concrete: timbre, age range, pace, emotion, articulation, and scenario.language_hints is used, it should match the language of preview_text.-vd- marker in the generated backend naming convention.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
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/aliyun-cosyvoice-voice-design/.target_model, prefix, voice_prompt, and preview_text in the evidence file.references/api_reference.mdreferences/sources.md