ugc-talking-head-video
它能做什么
这项技能制作简短的 UGC 风格视频,让角色面对镜头朗读脚本。它适合为社交媒体或广告制作口播片段的营销人员和创作者。
适用场景
- ✓当你希望锁定的角色在竖屏视频中面对镜头朗读脚本时。
- ✓当你需要为口播片段添加带有定时词语的字幕时。
- ✓当你希望根据已选定的角色图片制作 UGC 风格片段的时候。
技能链接
https://github.com/superdesigndev/treg/blob/main/.agents/skills/ugc-talking-head-video/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这张角色图片和我 15 秒的脚本做成一段带字幕的竖屏口播视频。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会选择声音参考,根据片段长度调整脚本,编写视频提示词,并通过 treg 生成片段。随后,它使用基于 ffmpeg 的代码脚本添加表情符号标题和短语字幕。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
UGC talking-head video
Input: one character image (the frame you and the user picked from portrait-clone) and a script.
Output: take_N.mp4 (raw) and take_N_captioned.mp4, plus the request JSON that made it.
Model: Seedance 2.5 through treg, reAPI route by default, PiAPI as the alternative (scripts/seedance_treg.py). No vendor key on this machine. Captions: ffmpeg + PIL (scripts/caption_burn.py).
Both scripts are self-contained; read their docstrings before changing them.
Prerequisites
- treg. Every generation call, reference upload and status poll goes through
treg call; the vendor key is injected server-side and the charge lands on the team's prepaid treg balance. Iftreg --versionfails, install and sign in first:
Thencurl -fsSL https://treg.to/install.sh | sh treg logintreg balanceto confirm there is credit for the run (a take costs a few dollars, § Run). - A character image. If the user has no locked character yet, generate one first with the
portrait-cloneskill (sibling folder.agents/skills/portrait-clone/, or the published copy at https://raw.githubusercontent.com/agentara/skills/refs/heads/main/skills/aigc/portrait-clone/SKILL.md). Read it, follow it, then come back here with the chosen frame. ffmpeg, Python 3 with PIL, andOPENAI_API_KEYin the environment for Whisper word timings (captions only).
Flow
- Lock the script and duration (§ Script and duration). Show the user the word count and the proposed seconds before anything else.
- Get a voice-reference clip (§ Voice reference). Never generate without one.
- Write the prompt from the template (§ Prompt). Paste the whole thing to the user before the first run.
- Run
seedance_treg.py. Quote the estimated cost in the same message you announce the run. - Verify with the checks in § Verify, send the raw clip, and only then caption.
- Caption with
caption_burn.pyusing hand-written phrases.
Script and duration
The model fills every second it is given. Too long and the delivery goes flat because there is nowhere to breathe; too short and words get dropped. Size the duration from the script, not the other way round.
| Words | Duration | Feel |
|---|---|---|
| 45-55 | 12-14 s | punchy hook |
| 60-70 | 16-17 s | standard UGC talking head |
| 70-80 | 18-19 s | dense; 18 s reads noticeably quicker than 19 s |
| 90+ | split into two clips | one Seedance take over 20 s of continuous speech drifts |
Rule of thumb: words / 4 = seconds, then subtract 1 s. Our 74-word script felt slow at 19 s and right at 18 s. Confirm the script verbatim with the user first, including slang ("gonna", "brain cell"): the captions later follow the transcript, and Whisper normalises "gonna" to "going to", so warn them the on-screen text may differ from the script spelling.
Join sentences with commas, not periods, if you do not want a hold at the sentence turn. The model treats a period as permission to stop for half a second.
Voice reference
Cadence comes from the audio reference, not from the prompt. We proved this: the same script and near-identical prompts gave a flat delivery without a reference and a natural one with it, while a prompt full of beat-by-beat pacing directions moved the pace by a few percent at most and introduced whispering and long dead pauses the user hated.
- Ask the user for a video whose delivery they like. If they have none, find candidates through
treg and let them choose. Use the routed endpoints and say what you want, not a vendor:
catalog_search("instagram reels search by keyword")->treg.instagram.search.reels(measured 86% success), orcatalog_search("tiktok search videos")/treg.douyin.search.videos. Search the niche ("money tips talking head", "creator secret"), pick 3-5 results with a play URL, send the links, and ask which voice and pace they want. Do not pick for them. - Extract a 2-15 s slice, mono mp3. PiAPI rejects longer references (reAPI allows up to 30 s). Choose the most
animated stretch, not the opening line: run Whisper with segment timestamps, read the
segments, pick a run with a rise and fall in it.
ffmpeg -ss <start> -to <end> -i src.mp4 -vn -ac 1 -ar 44100 -b:a 128k voice_ref.mp3 - Keep the clip and its source timestamps next to the outputs; the user will ask where it came from.
Prompt
Under 4000 characters. Five parts, in this order. Fill the braces; keep the rest verbatim, it
常见问题
我需要先有角色图片吗?
需要。该技能要求一张锁定的角色图片,portrait-clone 技能可以生成这样的图片。
我需要安装什么?
该技能需要 treg、ffmpeg、带有 PIL 的 Python,以及用于获取单词时间戳的 OpenAI 密钥。
每个片段的成本是多少?
该技能说明,每个片段需要几美元,智能体应在每个付费步骤前进行确认。
详情
作者的原始描述
Turn a locked character image (from portrait-clone) into a UGC-style 9:16 talking-head video: pick a voice-reference clip, size the script to the duration, write the Seedance 2.5 prompt, generate through treg (reAPI or PiAPI), then burn a static emoji header and phrase captions with code. Use after portrait-clone when the user wants the character to speak a script on camera.
repo: superdesigndev/treg
热度
- GitHub 星标
- 7.0k
- 排名
- #13701
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
code-quality
7.0k教你的智能体遵循清晰的代码规范:用工具强制执行规则,少写注释,让测试能够失败,并保持文档简短。
google-ads
7.0k帮你的智能体安全地生成 Google Ads 报告并进行修改,避免常见的 API 版本和预算错误,以免浪费资金。
google-analytics
7.0k帮你的智能体从 Google Analytics 4 获取准确的流量、转化和收入数据,避免不完整的日期和虚假的零值。
google-search-console
7.0k帮你的智能体从 Search Console 报告自然搜索的点击、展示和排名,避免把尚不完整的近期数据误认为下降。