Communitygithub.com

Andersonlimahw/lemon-ai-hub

同步旁白、字幕、音樂與音效至畫面——包含旁白撰寫、腳本鎖定、TTS 或錄製配音、逐詞時間戳、字幕區塊、由語音軌道衍生的鏡頭視窗、停留預算、閃避及音量目標。適用於解說影片、配音變更、字幕製作或任何需配合音訊時序的影片。

lemon-ai-hub 是什麼?

此技能專為開發者與 AI 代理使用者設計,用於精確同步影片中的旁白、字幕、音樂及音效。其核心原則是「語音軌道驅動時鐘」,所有畫面時序均根據測量到的音訊長度決定,而非猜測。支援多種工作流程:從旁白撰寫(依語速預算)、腳本鎖定、TTS(如 ElevenLabs、Azure、OpenAI、Google、edge-tts)或錄製配音,到透過 WhisperX、stable-ts 等工具取得逐詞時間戳。最終產出含鏡頭幀數、字幕區塊與章節起點的 timeline.json,以及 SRT/VTT 字幕檔案,並支援混音與預覽檢查點。

相容平台~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 字元/秒。

腳本檔案格式(一個段落 = 一個鏡頭,| 分隔字幕區塊):

# CHAPTER 1 為什麼地圖會騙人
你見過的每一張地圖 | 都是有人 | 為了某個理由所繪製。

麥卡托投影想讓水手 | 保持直線航行。
## gap 0.6

## gap <秒數> 要求段落後至少暫停指定秒數(讓最後一個畫面停留)。需在音訊中實現——SSML 用 <break time="600ms"/>(TTS),或按段落組裝檔案時插入靜音。時間軸工具永遠不調整時序;它僅驗證暫停。

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": "你見過的每一張地圖", "start": 0.00, "end": 1.42,
  "words": [{"word": "你見過的", "start": 0.00, "end": 0.21}]}]}

5. 建立時間軸

python3 <plugin-root>/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 秒(需在音訊中加入暫停或合併鏡頭)、要求的 ## gap 暫停音訊中未包含、以及靜音超過 3 秒。強制對齊器未標記時間的單字(常見於 WhisperX 中的數字)則在其鄰近單字之間進行內插。將 timeline.json 餵給合成程式;切勿手動重新輸入幀數。

6. 字幕規則

  • 每行 ≤42 個字元,≤2 行,螢幕上停留 ≥1.0 秒,閱讀速度上限約 17 字元/秒。
  • 在片語邊界斷行,切勿在冠詞和名詞之間斷行。
  • 在 9:16 畫面中,讓字幕避開下方平台 UI 區域,並遠離螢幕上的 UI 文字。
  • 社群媒體使用內嵌字幕;YouTube 與網頁播放器使用側掛 SRT/VTT。

7. 混音

層級目標
整合音量(最終)社群/網路 −14 LUFS(−16 可接受);廣播 −23 LUFS
真實峰值≤ −1 dBTP
配音下音樂語音出現時閃避 8–12 dB,150–300 ms 起音/釋放
音效約比音樂低 10 dB;與觸發幀同步,不可延遲

使用 <plugin-root>/scripts/qc.sh loudness final.mp4 測量(廣播請加 -23)。若已安裝 HyperFrames 音訊技能,hyperframes-audio 可在合成軟體內提供閃避(「配音挖空」)、等化器與自動化;否則使用 FFmpeg 的 sidechaincompress 與 loudnorm(兩遍處理)。

8. 預覽檢查點

渲染前 ≤30 秒(含語音、字幕與音樂),並詢問:「語音、節奏、字幕大小與韻律——可以嗎?」此後若改變節奏,將需重新執行 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

相關技能