mcpField
A
ai-avatar-video

ai-avatar-video

github.com/halt-catch-fire创意与媒体060.5k 次安装12 周前更新
代码仓库

关于 ai-avatar-video

此技能通过 inference.sh CLI 生成 AI 虚拟形象和口播视频,可用肖像搭配脚本或音频,并介绍多种视频模型及营销、教育和本地化工作流。

主要功能

  1. 01通过 belt CLI 运行视频模型
  2. 02用肖像和脚本生成虚拟形象
  3. 03使用内置 TTS 或提供音频
  4. 04通过提示词控制声音和视频风格
  5. 05提供配音与 UGC 工作流

适用场景

  1. 01制作产品演示和 UGC 风格广告
  2. 02制作课程与解说视频
  3. 03将视频配音为其他语言
  4. 04为社交媒体制作不同呈现者版本

安装

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

$npx skills add https://github.com/halt-catch-fire/mutiny --skill ai-avatar-video

安装后在 Claude Code 中输入/ai-avatar-video确认已加载。

详细介绍

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

AI 头像和对口型视频

通过 inference.sh CLI 创建 AI 头像和对口型视频。

AI 头像和对口型视频

快速入门

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

belt login

# Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS)
belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "Hello, welcome to our product demo!",
  "voice": "Zephyr (Female)"
}'

可用模型

从 P-Video-Avatar 开始——它的速度比其他方案快 18 倍,成本低 6 倍,并内置 TTS、动态背景且支持 1080p。

模型App ID最适合内置 TTS
P-Video-Avatarpruna/p-video-avatar综合最佳:速度、成本、质量、控制是(30 种声音,10 种语言)
OmniHuman 1.5bytedance/omnihuman-1-5多角色、音频驱动否
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,根据肖像和文本脚本生成头像:

belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "voice_script": "Welcome to our product walkthrough. Today I will show you three key features.",
  "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!",
  "voice": "Aoede (Female)",
  "voice_prompt": "Enthusiastic and energetic tone",
  "video_prompt": "The person is presenting on stage with dramatic lighting",
  "resolution": "1080p"
}'

使用音频文件,而非 TTS:

belt app run pruna/p-video-avatar --input '{
  "image": "https://portrait.jpg",
  "audio": "https://speech.mp3"
}'
完整工作流:生成肖像和头像

使用 Pruna P-Image 生成肖像,然后创建头像:

# 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)"
}'
OmniHuman 1.5(多角色)
belt app run bytedance/omnihuman-1-5 --input '{
  "image_url": "https://portrait.jpg",
  "audio_url": "https://speech.mp3"
}'

支持指定多人图像中要驱动的角色。

Fabric 1.0(让图像人物说话)
belt app run falai/fabric-1-0 --input '{
  "image_url": "https://face.jpg",
  "audio_url": "https://audio.mp3"
}'
PixVerse Lipsync
belt app run falai/pixverse-lipsync --input '{
  "image_url": "https://portrait.jpg",
  "audio_url": "https://speech.mp3"
}'

完整工作流:TTS + 头像(非 TTS 模型)

对于未内置 TTS 的模型(OmniHuman、PixVerse),请先生成语音:

# 1. Generate speech — Inworld TTS-2 for expressive character voices
belt app run inworld/text-to-speech-2 --input '{
  "text": "[friendly] Welcome to our product demo! [excited] Let me show you three features that will change how you work.",
  "voice_id": "Sarah",
  "delivery_mode": "CREATIVE"
}' > speech.json

# 2. Create avatar video with the speech
belt app run bytedance/omnihuman-1-5 --input '{
  "image_url": "https://presenter-photo.jpg",
  "audio_url": "<audio-url-from-step-1>"
}'

提示:对于大多数用途,使用内置 TTS 的 P-Video-Avatar 更简单——无需单独处理音频。只有在确实需要 OmniHuman(多角色)或 PixVerse(逼真口型同步)时,才使用此工作流。

完整工作流:将视频配音为另一种语言

# 1. Transcribe original video
belt app run infsh/fast-whisper-large-v3 --input '{"audio_url": "https://video.mp4"}' > transcript.json

# 2. Translate text (manually or with an LLM)

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

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

头像 UGC 生成

使用 P-Video-Avatar 创建 UGC 风格内容——内置 TTS,无需单独处理音频:

# 1. Generate a relatable UGC-style portrait
belt app run pruna/p-image --input '{
  "prompt": "casual selfie-style photo of a young woman in a cozy room, natural lighting, looking at camera, warm smile, authentic feel",
  "aspect_ratio": "9:16"
}'

# 2. Create UGC avatar video with built-in TTS
belt app run pruna/p-video-avatar --input '{
  "image": "<image-url-from-step-1>",
  "voice_script": "Okay so I just tried this product and honestly? It is a game changer. I was not expecting to love it this much but here we are!",
  "voice": "Zephyr (Female)",
  "voice_prompt": "Excited, casual, authentic tone like talking to a friend",
  "video_prompt": "The person is talking casually to camera in their room, natural gestures",
  "resolution": "1080p"
}'
为什么 UGC 适合使用 P-Video-Avatar
  • 一体化——内置 TTS,无需单独生成音频
  • 30 种声音,10 种语言——匹配目标受众
  • 语音 + 视频提示词——分别控制语气、情绪、肢体语言和背景
  • 快 18 倍,便宜 6 倍——相比 Fabric/OmniHuman/HeyGen,可大规模制作 UGC
  • 支持 1080p——仅凭一张肖像图即可生成可直接用于平台的竖屏视频
批量生成 UGC:同一产品,多位演示者
# Generate 3 different presenters
for voice in "Zephyr (Female)" "Puck (Male)" "Aoede (Female)"; do
  belt app run pruna/p-video-avatar --input "{
    \"image\": \"https://portrait.jpg\",
    \"voice_script\": \"This changed my morning routine completely. Five minutes and I am done.\",
    \"voice\": \"$voice\",
    \"voice_prompt\": \"Casual, authentic, like a real testimonial\",
    \"video_prompt\": \"Person talking to camera in a bright kitchen\",
    \"resolution\": \"1080p\"
  }"
done

使用场景

  • UGC 和营销:产品演示、由 AI 演示者制作的 UGC 风格广告
  • 教育:课程视频、讲解视频
  • 本地化:仅凭一张图,即可为内容制作 10 种语言的配音
  • 社交媒体:风格一致的虚拟网红内容
  • 企业:培训视频、公告
  • 游戏:角色头像、NPC 对话

提示

  • 使用高质量肖像照片(正面拍摄、光线充足)
  • 音频应清晰,尽量减少背景噪声
  • P-Video-Avatar 支持内置 TTS,无需单独生成语音
  • P-Video-Avatar 的输出宽高比与输入图像一致
  • 使用 pruna/p-image 并设置 9:16 宽高比生成肖像,以制作竖屏视频
  • OmniHuman 1.5 支持在一张图像中出现多个人物
  • LatentSync 最适合将现有视频与新音频同步

相关技能

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

# Full platform skill (all apps)
npx skills add inference-sh/skills@infsh-cli

# Text-to-speech (generate audio for non-TTS avatar models)
npx skills add inference-sh/skills@text-to-speech

# Speech-to-text (transcribe for dubbing)
npx skills add inference-sh/skills@speech-to-text

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

# Image generation (create avatar images)
npx skills add inference-sh/skills@ai-image-generation

浏览所有视频应用:belt app list --category video

文档

评论

支持 Markdown