$npx -y skills add cinience/alicloud-skills --skill aliyun-liveportraitUse when generating lightweight talking-head portrait videos with Alibaba Cloud Model Studio LivePortrait (liveportrait) from a detected portrait image and speech audio. Use when you need long-form or simple broadcast-style portrait animation beyond the typical short expressive
| 1 | Category: provider |
| 2 | |
| 3 | # Model Studio LivePortrait |
| 4 | |
| 5 | ## Validation |
| 6 | |
| 7 | ```bash |
| 8 | mkdir -p output/aliyun-liveportrait |
| 9 | python -m py_compile skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py && echo "py_compile_ok" > output/aliyun-liveportrait/validate.txt |
| 10 | ``` |
| 11 | |
| 12 | Pass criteria: command exits 0 and `output/aliyun-liveportrait/validate.txt` is generated. |
| 13 | |
| 14 | ## Output And Evidence |
| 15 | |
| 16 | - Save normalized request payloads, template choice, and task polling snapshots under `output/aliyun-liveportrait/`. |
| 17 | - Record the exact portrait/audio URLs and motion-strength related parameters. |
| 18 | |
| 19 | Use LivePortrait when the job is lightweight portrait animation with speech audio, especially for longer clips or simpler presenter-style motion. |
| 20 | |
| 21 | ## Critical model names |
| 22 | |
| 23 | Use these exact model strings: |
| 24 | - `liveportrait-detect` |
| 25 | - `liveportrait` |
| 26 | |
| 27 | Selection guidance: |
| 28 | - Run `liveportrait-detect` first to verify the portrait image. |
| 29 | - Use `liveportrait` for the actual video generation task. |
| 30 | |
| 31 | ## Prerequisites |
| 32 | |
| 33 | - China mainland (Beijing) only. |
| 34 | - Set `DASHSCOPE_API_KEY` in your environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials`. |
| 35 | - Input image and audio must be public HTTP/HTTPS URLs. |
| 36 | |
| 37 | ## Normalized interface (video.liveportrait) |
| 38 | |
| 39 | ### Detect Request |
| 40 | - `model` (string, optional): default `liveportrait-detect` |
| 41 | - `image_url` (string, required) |
| 42 | |
| 43 | ### Generate Request |
| 44 | - `model` (string, optional): default `liveportrait` |
| 45 | - `image_url` (string, required) |
| 46 | - `audio_url` (string, required) |
| 47 | - `template_id` (string, optional): `normal`, `calm`, or `active` |
| 48 | - `eye_move_freq` (number, optional): `0` to `1` |
| 49 | - `video_fps` (int, optional): `15` to `30` |
| 50 | - `mouth_move_strength` (number, optional): `0` to `1.5` |
| 51 | - `paste_back` (bool, optional) |
| 52 | - `head_move_strength` (number, optional): `0` to `1` |
| 53 | |
| 54 | ### Response |
| 55 | - `task_id` (string) |
| 56 | - `task_status` (string) |
| 57 | - `video_url` (string, when finished) |
| 58 | |
| 59 | ## Quick start |
| 60 | |
| 61 | ```bash |
| 62 | python skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py \ |
| 63 | --image-url "https://example.com/portrait.png" \ |
| 64 | --audio-url "https://example.com/speech.mp3" \ |
| 65 | --template-id calm \ |
| 66 | --video-fps 24 \ |
| 67 | --paste-back |
| 68 | ``` |
| 69 | |
| 70 | ## Operational guidance |
| 71 | |
| 72 | - Use a clear, front-facing portrait with low occlusion. |
| 73 | - Keep the audio clean and voice-dominant. |
| 74 | - `paste_back=false` outputs only the generated face region; keep it `true` for standard talking-head output. |
| 75 | - LivePortrait is a better fit than EMO when you need longer, simpler presenter-style clips. |
| 76 | |
| 77 | ## Output location |
| 78 | |
| 79 | - Default output: `output/aliyun-liveportrait/request.json` |
| 80 | - Override base dir with `OUTPUT_DIR`. |
| 81 | |
| 82 | ## References |
| 83 | |
| 84 | - `references/sources.md` |