Communitygithub.com

Andersonlimahw/lemon-ai-hub

同步叙述、字幕、音乐和音效与画面——叙述写作、脚本锁定、TTS或录制旁白、单词级时间戳、字幕块、基于音轨的画面窗口、停留预算、闪避和响度目标。适用于解说视频、旁白替换、字幕或任何需要时间跟随音频的视频。

lemon-ai-hub 是什么?

该技能旨在解决视频制作中音频与画面精确同步的难题。它提供了一套完整的流程:从叙述写作(强调叙事逻辑和感官化表达)、脚本锁定(确保成本可控)、语音生成(支持TTS和录制旁白)、获取单词级时间戳,到自动化构建时间线、生成字幕和最终混音。它支持多个平台,如ElevenLabs、Azure等云端TTS,以及WhisperX等本地对齐工具。其核心原则是“音轨驱动时钟”,即所有画面和字幕的时间点都精确地从音频中推导,而非凭猜测。该技能还内置了严格的质量控制,包括字幕长度、阅读速度、混音响度标准以及预览检查点,确保最终输出在听觉和视觉上都达到专业水准。对于任何需要音频引导节奏的视频项目(如解说、教程、广告),此技能都能大幅提升效率和精度。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Andersonlimahw/lemon-ai-hub/tree/HEAD/plugins/motion-movie-expert/skills/voice-video-sync

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

语音 ↔ 视频同步

规则零:音轨驱动时钟。 画面根据实测音频进行定时,绝不能依赖猜测的持续时间。

1. 撰写旁白

  • 从观众的处境切入,而非定义。一个故事线;先有因后有果。
  • 将数字转换为可感知的尺度(例如“电话本大小”,而非“3.2 MB”)。
  • 比喻必须有分量;叙述者需持有观点。
  • 不要描述画面已经展示的内容;要说出画面无法传达的信息。
  • 结尾呼应开头。章节边界需要衔接:第N章的最后一行要为第N+1章的第一行做铺垫。
  • 根据语速进行预算:英语约125–150词/分钟(TTS语音各异——需测量一个样本);葡萄牙语约140–160词/分钟;中文约4–5.5字符/秒。

脚本文件格式(一个段落=一个镜头,| 分割字幕块):

# 第1章 地图为何撒谎
你看过的每一张地图 | 都是由某个 | 有目的的人绘制的。

墨卡托希望水手 | 能沿着直线航行。
## gap 0.6

## gap <秒数> 要求在该段落之后至少pause该时长(为最后一个画面提供停留时间)。需在音频中体现——对于TTS,使用SSML <break time="600ms"/>;对于逐段落文件汇编,则插入静音。时间线工具绝不移动时间点;它仅用于验证pause。

2. 锁定脚本

展示完整脚本,包含词数和预估时长,并获得明确的“已批准”。锁定后,所有时间点均从音频推导;更改任何一个词将导致其后的所有镜头重新定时。

3. 制作语音

  • TTS(无录音时的默认选项):询问用户偏好的引擎/语音。将文本发送至云端TTS(ElevenLabs、Azure、OpenAI、Google、edge-tts)会将脚本共享给该提供商——需先确认。本地选项(Kokoro、Piper)则可保留在机器上。
  • 录制旁白:接受WAV 48 kHz格式。修剪静音,保留自然呼吸,后续在混音中做规范化处理。
  • 保持每个段落一个文件,或一个主文件加时间戳;两种方式均适用于时间线工具。

4. 获取时间戳

使用TTS API响应中的词级或段级时间戳,或使用音频与脚本强制对齐工具(WhisperX、whisper-timestamped、stable-ts,或带 word_timestamps=True 参数的Whisper)。将其规范化为此JSON格式:

{"segments": [{"text": "Every map you have seen", "start": 0.00, "end": 1.42,
  "words": [{"word": "Every", "start": 0.00, "end": 0.21}]}]}

5. 构建时间线

python3 <插件根目录>/scripts/build_timeline.py words.json --script script.txt --fps 30 \
  --out-dir timeline/ --max-chars 42 --min-dwell 1.0

生成 timeline.json(包含镜头起始/结束帧、字幕块、章节起点)、captions.srt、captions.vtt,并针对以下情况发出警告:脚本中的词在音频中缺失(或音频中的词在脚本中缺失)、字幕过长或阅读速度过快、镜头最后一条字幕距离下一个镜头不足 --min-dwell 秒(需在音频中添加pause或合并镜头)、请求的 ## gap pause在音频中不存在、以及超过3秒的静音。强制对齐工具未能定时的词(如WhisperX中的数字)将在其相邻词之间进行插值。将 timeline.json 输入到合成流程中;切勿手动输入帧号。

6. 字幕规则

  • 每行≤42个字符,≤2行,屏幕上停留时间≥1.0秒,最高阅读速度约为17字符/秒。
  • 在短语边界处断行,绝不能在冠词和名词之间断开。
  • 在9:16比例中,保持字幕远离下部平台界面区域以及屏幕上的UI文字。
  • 社交媒体使用内嵌字幕;YouTube和网页播放器使用侧加载的SRT/VTT文件。

7. 混音

层级目标
集成响度(最终)社交/网络为−14 LUFS(−16亦可接受);广播为−23 LUFS
真实峰值≤ −1 dBTP
旁白下的音乐语音出现时闪避8–12 dB,起音/释放时间为150–300 ms
音效比音乐低约10 dB;放置于动因帧上,而非之后

使用 <插件根目录>/scripts/qc.sh loudness final.mp4 进行测量(广播用途加 -23)。当安装了HyperFrames音频技能时,hyperframes-audio 可在合成流程内提供闪避(“旁白雕刻”)、均衡器和自动化;否则使用FFmpeg的 sidechaincompress 和 loudnorm(两遍处理)。

8. 预览检查点

渲染前≤30秒的内容(包含语音、字幕和音乐)并询问:“语音、节奏、字幕大小和韵律——是否OK?”在此之后更改节奏意味着需重新运行TTS并重新定时一切。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

Andersonlimahw/lemon-ai-hub

When the user wants to plan a product launch, feature announcement, or release strategy. Also use when the user mentions 'launch,' 'Product Hunt,' 'feature release,' 'announcement,' 'go-to-market,' 'beta launch,' 'early access,' 'waitlist,' 'product update,' 'how do I launch this,' 'launch checklist,' 'GTM plan,' or 'we're about to ship.' Use this whenever someone is preparing to release something publicly. For ongoing marketing after launch, see marketing-ideas. For the offer being launched (bonuses, guarantees, scarcity, naming), see offers.

Andersonlimahw/lemon-ai-hub

Create and edit motion videos end to end — product motion films, motion graphics, narrated explainers, captioned clips, UI animation recreations, and recuts. Orchestrates brief, storyboard, choreography, build (HyperFrames or any deterministic renderer), voice/caption sync, and render QC. Use when the user asks to make, animate, storyboard, narrate, caption, edit, or render a video or motion piece; skip for static images and web UI work with no video deliverable.

Andersonlimahw/lemon-ai-hub

Build and render a deterministic video composition — HyperFrames (HTML + GSAP) by default, or a custom seek(t) + Playwright + FFmpeg pipeline. Covers project setup, composition contract, timeline rules, creative direction for frames, lint/check/snapshot, preview, and local render. Use when implementing an approved storyboard as code.

Andersonlimahw/lemon-ai-hub

Motion law for multi-scene videos — seam continuity (axis, direction, speed, phase), carriers, causal motion, springs and timing, camera, transitions, stillness, and loop design. Use when planning or fixing how scenes connect and move, before and during any animation build.

Andersonlimahw/lemon-ai-hub

Short design-led motion graphics where motion is the message — kinetic typography, stat count-up, chart/data-viz reveal, logo sting, lower third or callout, animated map, tweet/news/headline card, webpage or UI walkthrough, and image-plus-data fusion. Usually under 10 s, up to about 30 s, no narration; renders to MP4 or a transparent overlay. Use when the user wants a short motion graphic, animated stat/chart/logo/map/card, or overlay; when the upstream HyperFrames `motion-graphics` skill is installed, use it for exact CLI flags and registry blocks.

Andersonlimahw/lemon-ai-hub

Turn a video idea, product, or script into an approved master prompt and pre-implementation storyboard — intake, concept, 8–12 state sequence, beat grid, transition map, camera plan, audio cue plan, and render architecture. Use before building any new video, or when a video brief is vague.

Andersonlimahw/lemon-ai-hub

Motion tokens, spring presets, and React/Next.js (motion/react) interaction patterns for product UI that appears in a video — rebuilding real product screens faithfully, animating them as seekable scenes, and keeping the live product's motion consistent with the film. Use when a motion video shows or recreates product UI; for web UI work with no video deliverable use design-expert instead.

Andersonlimahw/lemon-ai-hub

Edit existing video and verify any render before delivery — recut, trim, reframe to other aspect ratios, burn in or attach captions, swap or remix audio, loop, and export; plus the QC gates (probe, contact sheet, stills per beat, loudness, loop seam, legibility, facts, PII). Use for editing footage or for the final check of any motion video.

Andersonlimahw/lemon-ai-hub

Agent skill at plugins/video/SKILL.md

相关技能