Loading...
Loading...
使用AI虚拟形象、唇形同步和语音旁白制作会说话的头部视频。涵盖肖像要求、音频质量、OmniHuman、PixVerse唇形同步、Dia TTS等内容。适用场景:代言人视频、课程内容、社交媒体、演示文稿、产品演示。相关关键词:会说话的头部视频、虚拟形象视频、唇形同步、AI代言人、虚拟主持人、AI主持人、OmniHuman、会说话的虚拟形象、视频主持人、AI会说话的头部视频、主持人视频、AI人脸视频
npx skill4agent add skill-zero/s talking-head-productioncurl -fsSL https://cli.inference.sh | sh && infsh login
# 生成对话音频
infsh app run falai/dia-tts --input '{
"prompt": "[S1] Welcome to our product tour. Today I will show you three features that will save you hours every week."
}'
# 使用OmniHuman创建会说话的头部视频
infsh app run bytedance/omnihuman-1-5 --input '{
"image": "path/to/portrait.png",
"audio": "path/to/dialogue.mp3"
}'| 要求 | 原因 | 规格 |
|---|---|---|
| 居中构图 | 虚拟形象需要面部处于可预测的位置 | 面部位于画面中央 |
| 头肩取景 | 显示身体部分以实现自然手势 | 裁剪至胸部以下 |
| 直视镜头 | 与观众建立连接 | 正面直视镜头 |
| 中性表情 | 作为动画的起始状态 | 可带轻微微笑,不要大笑或皱眉 |
| 面部清晰 | 模型需要检测面部特征 | 无墨镜、浓重阴影或遮挡物 |
| 高分辨率 | 保留细节 | 面部区域最小512x512,理想为1024x1024及以上 |
| 类型 | 使用场景 |
|---|---|
| 纯色背景 | 专业、简洁,易于合成 |
| 柔焦背景 | 自然、生活化风格 |
| 办公室/工作室背景 | 商务场景 |
| 透明背景(通过抠图实现) | 合成到其他场景中 |
# 生成专业肖像背景
infsh app run falai/flux-dev-lora --input '{
"prompt": "professional headshot photograph of a friendly business person, soft studio lighting, clean grey background, head and shoulders, direct eye contact, neutral pleasant expression, high quality portrait photography"
}'
# 或移除现有肖像的背景
infsh app run <bg-removal-app> --input '{
"image": "path/to/portrait-with-background.png"
}'| 参数 | 目标 | 原因 |
|---|---|---|
| 背景噪音 | 无/极少 | 噪音会干扰唇形同步的时序 |
| 音量 | 全程一致 | 防止同步偏移 |
| 采样率 | 44.1kHz或48kHz | 标准音质 |
| 格式 | MP3 128kbps+或WAV | 兼容所有工具 |
# 简单旁白
infsh app run falai/dia-tts --input '{
"prompt": "[S1] Hi there! I am excited to share something with you today. We have been working on a feature that our users have been requesting for months... and it is finally here."
}'
# 带情感和节奏的音频
infsh app run falai/dia-tts --input '{
"prompt": "[S1] You know what is frustrating? Spending hours on tasks that should take minutes. (sighs) We have all been there. But what if I told you... there is a better way?"
}'| 模型 | 应用ID | 最佳适用场景 | 最长时长 |
|---|---|---|---|
| OmniHuman 1.5 | | 多角色、手势动作、高质量 | 每段约30秒 |
| OmniHuman 1.0 | | 单角色、简单场景 | 每段约30秒 |
| PixVerse Lipsync | | 现有视频快速唇形同步 | 短视频 |
| Fabric | | 肖像上的布料动画 | 短视频 |
# 1. 生成或准备音频
infsh app run falai/dia-tts --input '{
"prompt": "[S1] Your narration script here."
}'
# 2. 生成会说话的头部视频
infsh app run bytedance/omnihuman-1-5 --input '{
"image": "portrait.png",
"audio": "narration.mp3"
}'# 1-2. 与上述步骤相同
# 3. 为会说话的头部视频添加字幕
infsh app run infsh/caption-videos --input '{
"video": "talking-head.mp4",
"caption_file": "captions.srt"
}'# 生成音频片段
infsh app run falai/dia-tts --input '{"prompt": "[S1] Segment one script."}' --no-wait
infsh app run falai/dia-tts --input '{"prompt": "[S1] Segment two script."}' --no-wait
infsh app run falai/dia-tts --input '{"prompt": "[S1] Segment three script."}' --no-wait
# 为每个片段生成会说话的头部视频(使用相同肖像保持一致性)
infsh app run bytedance/omnihuman-1-5 --input '{"image": "portrait.png", "audio": "segment1.mp3"}' --no-wait
infsh app run bytedance/omnihuman-1-5 --input '{"image": "portrait.png", "audio": "segment2.mp3"}' --no-wait
infsh app run bytedance/omnihuman-1-5 --input '{"image": "portrait.png", "audio": "segment3.mp3"}' --no-wait
# 合并所有片段
infsh app run infsh/media-merger --input '{
"media": ["segment1.mp4", "segment2.mp4", "segment3.mp4"]
}'# 1. 生成双角色对话音频
infsh app run falai/dia-tts --input '{
"prompt": "[S1] So tell me about the new feature. [S2] Sure! We built a dashboard that shows real-time analytics. [S1] That sounds great. How long did it take? [S2] About two weeks from concept to launch."
}'
# 2. 创建双角色视频
infsh app run bytedance/omnihuman-1-5 --input '{
"image": "two-person-portrait.png",
"audio": "dialogue.mp3"
}'┌─────────────────────────────────┐
│ 顶部留白(最少) │
│ ┌───────────────────────────┐ │
│ │ │ │
│ │ ● ─ ─ 眼睛位于上1/3处 ─ ─│─ │ ← 眼睛位于上1/3线位置
│ │ /|\ │ │
│ │ | 头肩区域可见 │ │
│ │ / \ │ │
│ │ │ │
│ └───────────────────────────┘ │
│ 裁剪至胸部以下 │
└─────────────────────────────────┘| 错误 | 问题 | 解决方法 |
|---|---|---|
| 低分辨率肖像 | 面部模糊,唇形同步效果差 | 使用1024x1024及以上的面部区域 |
| 侧面/侧脸肖像 | 唇形同步无法很好地追踪嘴巴 | 使用正面或接近正面的肖像 |
| 音频有噪音 | 唇形同步偏移,效果不自然 | 录制清晰音频或使用TTS生成 |
| 片段过长 | 30秒后画质下降 | 拆分为多个片段,再拼接 |
| 戴墨镜/面部有遮挡 | 面部特征被遮挡 | 需要清晰无遮挡的面部 |
| 光线不一致 | 动画效果怪异 | 使用均匀柔和的光线 |
| 未添加字幕 | 失去静音/移动端观众 | 务必添加字幕 |
npx skills add inference-sh/skills@ai-avatar-video
npx skills add inference-sh/skills@ai-video-generation
npx skills add inference-sh/skills@text-to-speechinfsh app list