Install
openclaw skills install aliyun-cosyvoice-voice-cloneUse when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or cosyvoice-v3.5-flash, from reference audio and then reusing the returned voice_id in later TTS calls.
openclaw skills install aliyun-cosyvoice-voice-cloneCategory: provider
Use the CosyVoice voice enrollment API to create cloned voices from public reference audio.
Use model="voice-enrollment" and one of these target_model values:
cosyvoice-v3.5-pluscosyvoice-v3.5-flashcosyvoice-v3-pluscosyvoice-v3-flashcosyvoice-v2Recommended 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 used during enrollment must match the model used later in speech synthesis, otherwise synthesis fails.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_sample_url (string, required): public audio URLlanguage_hints (array[string], optional): only first item is usedmax_prompt_audio_length (float, optional): only for cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flashenable_preprocess (bool, optional): only for cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flashvoice_id (string): use this as the voice parameter in later TTS callsrequest_id (string)usage.count (number, optional)language_hints=["zh"]; control dialect style later in synthesis via text or instruct.cosyvoice-v3.5-plus, supported language_hints include zh, en, fr, de, ja, ko, ru, pt, th, id, vi.Prepare a normalized request JSON:
python skills/ai/audio/aliyun-cosyvoice-voice-clone/scripts/prepare_cosyvoice_clone_request.py \
--target-model cosyvoice-v3.5-plus \
--prefix myvoice \
--voice-sample-url https://example.com/voice.wav \
--language-hint zh
mkdir -p output/aliyun-cosyvoice-voice-clone
for f in skills/ai/audio/aliyun-cosyvoice-voice-clone/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-cosyvoice-voice-clone/validate.txt
Pass criteria: command exits 0 and output/aliyun-cosyvoice-voice-clone/validate.txt is generated.
output/aliyun-cosyvoice-voice-clone/.target_model, prefix, and sample URL in the evidence file.references/api_reference.mdreferences/sources.md