- Third-party
Pruna 的 P-Video-Avatar 可基于单张肖像图像,由文本脚本或音频文件驱动生成数字人口播视频,支持多种音色、语言和输出分辨率。
| 模型信息 | |
|---|---|
| 更多信息 | 链接 ↗ |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'pruna/p-video-avatar',
{
image: 'https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg',
voice_script: 'Hello, welcome to our product demo!',
voice: 'Zephyr (Female)',
resolution: '720p',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "pruna/p-video-avatar",
"input": {
"image": "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg",
"voice_script": "Hello, welcome to our product demo!",
"voice": "Zephyr (Female)",
"resolution": "720p"
}
}'{
"state": "Completed",
"result": {
"video": "https://examples.aig.cloudflare.com/pruna/p-video-avatar/product-demo-greeting.mp4"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}参数
image
stringrequired输入肖像图像(首帧)。HTTP(S) URL 或 data URI。支持 jpg、jpeg、png、webp。audio
string用于驱动语音的已上传音频的 URL。HTTP(S) URL 或 data URI。如果同时提供 audio 和 voice_script,则优先使用 audio。voice
stringrequireddefault: Zephyr (Female)enum: Zephyr (Female), Puck (Male), Charon (Male), Kore (Female), Fenrir (Male), Leda (Female), Orus (Male), Aoede (Female), Callirrhoe (Female), Autonoe (Female), Enceladus (Male), Iapetus (Male), Umbriel (Male), Algenib (Male), Despina (Female), Erinome (Female), Laomedeia (Female), Achernar (Female), Algieba (Male), Schedar (Male), Gacrux (Female), Pulcherrima (Female), Achird (Male), Zubenelgenubi (Male), Vindemiatrix (Female), Sadachbia (Male), Sadaltager (Male), Sulafat (Female), Alnilam (Male), Rasalgethi (Male)生成语音所用的音色。voice_script
stringrequireddefault: 未上传音频时人物要说的脚本。voice_language
stringrequireddefault: English (US)enum: English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi输出语言。resolution
stringrequireddefault: 720penum: 720p, 1080p视频的分辨率。video_prompt
stringrequireddefault: The person is talking.视频的可选提示词。voice_prompt
stringrequireddefault: Say the following.可选的说话风格、语气、节奏或情绪指令。negative_prompt
stringrequireddefault: 说明您不希望在视频中出现的内容。为空时禁用。strength_negative_prompt
numberrequireddefault: 0.5minimum: 0maximum: 4反向提示词的强度(0-4)。seed
integerminimum: -9007199254740991maximum: 9007199254740991用于结果可复现生成的随机种子。disable_safety_filter
booleanrequireddefault: true对提示词和输入图像禁用安全过滤器。disable_prompt_upsampling
booleanrequireddefault: false为 true 时,跳过提示词上采样器,直接传递用户的原始提示词。video
stringformat: uri生成的数字人视频的预签名 URL。