Category: provider
Model Studio VideoRetalk
Validation
CODEBLOCK0
Pass criteria: command exits 0 and output/aliyun-videoretalk/validate.txt is generated.
Output And Evidence
- - Save normalized request payloads, target face selection settings, and task polling snapshots under
output/aliyun-videoretalk/. - Record the exact video/audio input URLs and whether
video_extension was enabled.
Use VideoRetalk when the input is already a person video and the job is to replace lip sync with a new speech track.
Critical model names
Use this exact model string:
Prerequisites
- - This model currently only supports China mainland (Beijing).
- API is HTTP async only; there is no online console experience.
- Set
DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials.
Normalized interface (video.retalk)
Request
- -
model (string, optional): default INLINECODE8 - INLINECODE9 (string, required)
- INLINECODE10 (string, required)
- INLINECODE11 (string, optional): target face when input video contains multiple faces
- INLINECODE12 (bool, optional): extend video to match longer audio
- INLINECODE13 (int, optional):
120 to INLINECODE15
Response
- -
task_id (string) - INLINECODE17 (string)
- INLINECODE18 (string, when finished)
- INLINECODE19 (object, optional)
Endpoint and execution model
- - Submit task: INLINECODE20
- Poll task: INLINECODE21
- HTTP calls are async only and must set header
X-DashScope-Async: enable.
Quick start
CODEBLOCK1
Operational guidance
- - Keep input videos front-facing and close enough for stable face tracking.
- If the video contains multiple faces, provide
ref_image_url to anchor the intended target. - If the new audio is longer than the input video, decide explicitly whether to extend the picture track or truncate the audio.
- URLs must be public HTTP/HTTPS links; local file paths are not accepted by the API.
Output location
- - Default output: INLINECODE24
- Override base dir with
OUTPUT_DIR.
References
技能名称: aliyun-videoretalk
详细描述:
类别: provider
Model Studio VideoRetalk
验证
bash
mkdir -p output/aliyun-videoretalk
python -m pycompile skills/ai/video/aliyun-videoretalk/scripts/prepareretalkrequest.py && echo pycompile_ok > output/aliyun-videoretalk/validate.txt
通过标准:命令退出码为0,且生成 output/aliyun-videoretalk/validate.txt 文件。
输出与证据
- - 将标准化请求负载、目标人脸选择设置以及任务轮询快照保存到 output/aliyun-videoretalk/ 目录下。
- 记录确切的视频/音频输入URL,以及是否启用了 video_extension。
当输入已为人像视频,且任务是用新的语音轨道替换唇形同步时,请使用VideoRetalk。
关键模型名称
使用以下确切的模型字符串:
前提条件
- - 该模型目前仅支持中国大陆(北京)区域。
- API仅支持HTTP异步调用;没有在线控制台体验。
- 在环境中设置 DASHSCOPEAPIKEY,或者将 dashscopeapikey 添加到 ~/.alibabacloud/credentials 文件中。
标准化接口 (video.retalk)
请求
- - model (字符串,可选):默认为 videoretalk
- videourl (字符串,必填)
- audiourl (字符串,必填)
- refimageurl (字符串,可选):当输入视频包含多张人脸时,用于指定目标人脸
- videoextension (布尔值,可选):扩展视频以匹配更长的音频
- queryface_threshold (整数,可选):取值范围 120 到 200
响应
- - taskid (字符串)
- taskstatus (字符串)
- video_url (字符串,任务完成时返回)
- usage (对象,可选)
端点与执行模型
- - 提交任务:POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis/
- 轮询任务:GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
- HTTP调用仅为异步,且必须设置请求头 X-DashScope-Async: enable。
快速开始
bash
python skills/ai/video/aliyun-videoretalk/scripts/prepareretalkrequest.py \
--video-url https://example.com/talking-head.mp4 \
--audio-url https://example.com/new-voice.wav \
--video-extension
操作指南
- - 确保输入视频为正面拍摄且距离足够近,以保证稳定的面部追踪。
- 如果视频包含多张人脸,请提供 refimageurl 以锁定目标人物。
- 如果新音频比输入视频长,请明确决定是扩展画面轨道还是截断音频。
- URL必须是公开的HTTP/HTTPS链接;API不接受本地文件路径。
输出位置
- - 默认输出:output/aliyun-videoretalk/request.json
- 可通过 OUTPUT_DIR 覆盖基础目录。
参考资料