mcpField
T
talking-head-production

talking-head-production

github.com/qu-skills创意与媒体441 次安装12 周前更新
代码仓库

关于 talking-head-production

这是一项面向 inference.sh 用户的命令行技能,用于制作 AI 虚拟形象口播视频和唇形同步内容。它涵盖模型选择、人像与音频准备、语音和风格设置,以及从短片到拼接长视频的流程。

主要功能

  1. 01生成虚拟形象视频
  2. 02内置语音与自备音频流程
  3. 03人像准备指南
  4. 04语音、语言和风格设置
  5. 05多角色视频与片段拼接

适用场景

  1. 01制作产品介绍口播视频
  2. 02制作多语言主持人视频
  3. 03制作双角色对话视频
  4. 04将片段拼接成长视频

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/qu-skills/superpowers --skill talking-head-production

安装后在 Claude Code 中输入/talking-head-production确认已加载。

详细介绍

安装 belt CLI 技能: npx skills add belt-sh/cli

口播视频制作

通过 inference.sh CLI,使用 AI 虚拟形象和唇形同步制作口播视频。

快速开始

需要 inference.sh CLI(belt)。安装说明

belt login

# Recommended: P-Video-Avatar (built-in TTS, fastest, cheapest)
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "Welcome to our product tour. Today I will show you three features that will save you hours every week.",
  "voice": "Zephyr (Female)"
}'

肖像要求

源肖像图片至关重要。肖像效果不佳 = 视频输出效果不佳。

必备条件
要求原因规格
居中构图虚拟形象需要面部位于可预测的位置面部居中
头部和肩部身体可见,动作才自然裁剪至胸部以下
直视镜头与观众建立联系正面直视
表情自然作为动画的起始状态可以微笑,但不要大笑或皱眉
面部清晰模型需要识别面部特征不戴太阳镜,无浓重阴影或遮挡
高分辨率保留细节面部区域至少 512x512,理想为 1024x1024 以上
生成肖像
# Generate a professional portrait with P-Image
belt app run pruna/p-image --input '{
  "prompt": "professional headshot portrait of a friendly business person, soft studio lighting, clean grey background, head and shoulders, direct eye contact, neutral pleasant expression, photorealistic",
  "aspect_ratio": "9:16"
}'
背景选项
类型使用场景
纯色专业、简洁,易于合成
柔和散景自然、生活化的感觉
办公室/影棚商务场景
动态背景(P-Video-Avatar)使用 video_prompt 设置背景

模型选择

从 P-Video-Avatar 开始——它的速度是其他选项的 18 倍,成本仅为其 1/6,并内置 TTS。

模型应用 ID内置 TTS最适合
P-Video-Avatarpruna/p-video-avatar是(30 种声音,10 种语言)综合表现最佳:速度、成本、质量
OmniHuman 1.5bytedance/omnihuman-1-5否多角色、手势
OmniHuman 1.0bytedance/omnihuman-1-0否单角色
Fabric 1.0falai/fabric-1-0是让图像开口说话并进行唇形同步
PixVerse Lipsyncfalai/pixverse-lipsync否逼真的唇形同步
成本与速度对比
模型速度(每秒视频所需时间)每秒成本
P-Video-Avatar约 1.83 秒/秒$0.025
OmniHuman 1.5约 28 秒/秒(慢 15 倍)$0.16(贵 6.4 倍)
Fabric 1.0约 34 秒/秒(慢 18 倍)$0.14(贵 5.6 倍)

制作工作流

简单流程:文本脚本 -> 视频(P-Video-Avatar)

无需单独进行 TTS 步骤——P-Video-Avatar 内置语音:

belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "Hi there! I am excited to share something with you today.",
  "voice": "Puck (Male)",
  "voice_language": "English (US)",
  "resolution": "720p"
}'
控制风格
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "This is exciting news for our community!",
  "voice": "Aoede (Female)",
  "voice_prompt": "Enthusiastic and energetic tone, slightly faster pace",
  "video_prompt": "The person is presenting on stage with dramatic lighting",
  "resolution": "1080p"
}'
音频驱动(任何模型)

提供自己的音频文件:

# P-Video-Avatar with custom audio
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "audio": "https://speech.mp3"
}'

# OmniHuman with custom audio
belt app run bytedance/omnihuman-1-5 --input '{
  "image_url": "https://portrait.jpg",
  "audio_url": "https://speech.mp3"
}'
完整工作流:生成肖像 + 虚拟形象
# 1. Generate a portrait image
belt app run pruna/p-image --input '{
  "prompt": "professional headshot portrait of a young woman, neutral background, looking at camera, studio lighting, photorealistic",
  "aspect_ratio": "9:16"
}'

# 2. Create avatar video with built-in TTS
belt app run pruna/p-video-avatar --input '{
  "image": "<image-url-from-step-1>",
  "voice_script": "Hi there! Let me walk you through our latest features.",
  "voice": "Zephyr (Female)"
}'
使用单独的 TTS(适用于非 TTS 模型)
# 1. Generate speech
belt app run falai/dia-tts --input '{
  "prompt": "[S1] Your narration script here."
}'

# 2. Create talking head
belt app run bytedance/omnihuman-1-5 --input '{
  "image_url": "https://portrait.jpg",
  "audio_url": "<audio-url-from-step-1>"
}'
多角色对话

OmniHuman 1.5 最多支持 2 个角色:

# 1. Generate dialogue with two speakers
belt 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. Create video with two characters
belt app run bytedance/omnihuman-1-5 --input '{
  "image_url": "https://two-person-portrait.png",
  "audio_url": "<audio-url>"
}'
长视频(拼接片段)

对于超过约 60 秒的内容,请拆分为多个片段:

# Generate clips with same portrait for consistency
belt app run pruna/p-video-avatar --input '{"image": "https://portrait.jpg", "voice_script": "Segment one..."}' --no-wait
belt app run pruna/p-video-avatar --input '{"image": "https://portrait.jpg", "voice_script": "Segment two..."}' --no-wait
belt app run pruna/p-video-avatar --input '{"image": "https://portrait.jpg", "voice_script": "Segment three..."}' --no-wait

# Merge all segments
belt app run infsh/media-merger --input '{
  "media": ["segment1.mp4", "segment2.mp4", "segment3.mp4"]
}'
多语言内容

P-Video-Avatar 内置 TTS,支持 10 种语言:

# Spanish
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "Bienvenidos a nuestra demostración de producto.",
  "voice": "Kore (Female)",
  "voice_language": "Spanish"
}'

# Japanese
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "こんにちは、製品デモへようこそ。",
  "voice": "Leda (Female)",
  "voice_language": "Japanese"
}'
为现有视频配音
# 1. Transcribe original video
belt app run infsh/fast-whisper-large-v3 --input '{"audio_url": "https://video.mp4"}'

# 2. Translate text (manually or with LLM)

# 3. Generate speech in new language
belt app run infsh/kokoro-tts --input '{"text": "<translated-text>"}'

# 4. Lipsync original video with new audio
belt app run infsh/latentsync-1-6 --input '{
  "video_url": "https://original-video.mp4",
  "audio_url": "<new-audio-url>"
}'

音频质量(适用于非 TTS 工作流)

使用自己的音频时,音频质量会直接影响唇形同步的准确度。

参数目标原因
背景噪声无/尽可能少噪声会干扰唇形同步的时序
音量全程保持一致防止同步偏移
采样率44.1kHz 或 48kHz标准音质
格式MP3 128kbps 以上或 WAV兼容所有工具

可用语音(P-Video-Avatar)

女性: Zephyr、Kore、Leda、Aoede、Callirrhoe、Autonoe、Despina、Erinome、Laomedeia、Achernar、Gacrux、Pulcherrima、Vindemiatrix、Sulafat

男性: Puck、Charon、Fenrir、Orus、Enceladus、Iapetus、Umbriel、Algenib、Algieba、Schedar、Achird、Zubenelgenubi、Sadachbia、Sadaltager、Alnilam、Rasalgethi

语言: 英语(美国)、英语(英国)、西班牙语、法语、德语、意大利语、葡萄牙语(巴西)、日语、韩语、印地语

构图指南

┌─────────────────────────────────┐
│          Headroom (minimal)     │
│  ┌───────────────────────────┐  │
│  │                           │  │
│  │     ● ─ ─ Eyes at 1/3 ─ ─│─ │ ← Eyes at top 1/3 line
│  │    /|\                    │  │
│  │     |   Head & shoulders  │  │
│  │    / \  visible           │  │
│  │                           │  │
│  └───────────────────────────┘  │
│       Crop below chest          │
└─────────────────────────────────┘

常见错误

错误问题修复方法
低分辨率人像面部模糊,唇形同步效果差使用 1024x1024+ 的面部区域
侧面/侧身角度唇形同步难以准确追踪嘴部使用正面或接近正面的角度
音频有噪声唇形同步偏移,看起来不自然使用内置 TTS 或录制清晰音频
视频片段过长质量下降拆分成多个片段后再拼接
戴太阳镜/有遮挡面部特征被遮挡必须保证面部无遮挡
光线不一致动画效果诡异使用均匀、柔和的光线

相关技能

# Dedicated P-Video-Avatar skill
npx skills add inference-sh/skills@p-video-avatar

# All avatar models
npx skills add inference-sh/skills@ai-avatar-video

# All video generation models
npx skills add inference-sh/skills@ai-video-generation

# Text-to-speech
npx skills add inference-sh/skills@text-to-speech

# Image generation (for portraits)
npx skills add inference-sh/skills@ai-image-generation

浏览所有应用:belt app list

评论

支持 Markdown