Communitygithub.com

音訊清理 — 語音去噪

從已鎖定的主剪輯中移除背景噪音,產出語音自然、畫面不受影響的淨化版主檔。

音訊清理 — 語音去噪 是什麼?

此技能專注於 AI 影片編輯管線中的語音/音訊清理環節。當使用者需要「清理音訊/語音」、「移除背景雜音」、「去噪」、「隔離人聲」、修復戶外/室內/水流/嗡嗡/嘶嘶聲,或希望針對特定影片(如 video-N)產出淨化版主檔時,即可啟用。它涵蓋完整的決策流程:先透過頻譜圖與電平測量診斷雜音類型,再根據雜音特性選擇 ElevenLabs Voice Isolator(雲端 ML,適合動態寬頻雜音)或本地 RNNoise(免費離線,適合平穩雜音),並在短樣本上進行 A/B 比較以確認效果。最終使用 `tools/clean_voice.py` 工具清理完整主檔,同時以 RMS 匹配保留原始電平(不進行 LUFS 匹配),並將 `timeline.json` 的 master 路徑重新指向淨化版檔案,確保後續所有烘焙、音效混音與最終組合都使用乾淨的語音。此技能不處理 SFX/音樂混音(屬於 /suggest-sfx 與 final-mix 步驟)或剪輯裁切(屬於 /clean-cut),其原則為「最小必要處理、先診斷再選擇、在投入完整成本前進行 A/B 測試」。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/raisaksham377-bot/youtube-shorts-ai-editor/tree/HEAD/.claude/skills/clean-audio

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

clean-audio — 語音清理

取用已鎖定的主剪輯,移除其背景噪音,產出一個淨化版主檔,其語音聽起來自然、畫面保持不變。此步驟在剪輯鎖定後早期執行,確保下游所有環節——TSX 烘焙、SFX 混音、最終組合——都基於乾淨的語音。與使用者協作;最終響度/限制是 final-mix 步驟的工作,此步驟只負責「去噪,保留電平」。

核心引擎是 tools/clean_voice.py;此技能提供圍繞它的判斷流程:診斷 → 選擇方法 → A/B → 清理 → 重新連線。

兩種方法(依據雜音類型選擇 —— 這是核心決策)

方法這是什麼使用時機成本
--method elevenElevenLabs Voice Isolator(雲端 ML 語音/雜音分離)動態、寬頻雜音涵蓋語音頻段 —— 戶外流水、風聲、交通、人群、咖啡廳。本地工具無法移除這些。約 1000 點/分鐘(5.5 分鐘影片約 $1);需要 ELEVENLABS_API_KEY
--method rnnoise --model sh(或 cb)透過 ffmpeg arnndn 的本地 RNNoise(模型位於 tools/models/rnnoise/)平穩/輕度雜音(穩定嘶聲、風扇、部分室內環境音)。免費/離線。僅能部分移除動態雜音。免費

已在 video-1(戶外溪邊拍攝)驗證:afftdn 幾乎無效,RNNoise 僅部分壓低水聲,ElevenLabs 近乎完全移除(停頓處近乎靜音,語音與呼吸保留)。經驗法則:平穩雜音 → 先試本地;動態寬頻(水聲/風聲/交通) → ElevenLabs。

輸入(每次先讀取與測量)

  • 主檔 — videos/video-N/reference/<cut>.mp4(或已鎖定的剪輯)。原始檔案絕不修改;輸出為新的 -clean / -clean-<model> 檔案。
  • 合成預覽(如果存在) — videos/video-N/output/video-N-preview.mp4,用於透過更換音訊製作乾淨的場景內預覽(其影片完全相同 —— 無需重新烘焙)。
  • videos/video-N/work/timeline.json — 其中的 master 欄位;獲得批准後將其重新指向淨化版主檔。

工作流程

  1. 在選擇方法前先診斷雜音。 測量與觀察:
    • 電平:ffmpeg -i M -vn -af astats(RMS、峰值、噪聲底限)+ ebur128(整合 LUFS、真實峰值)。
    • 尋找無語音間隙(grep edited-transcript.json 找出最大的字間間隙)並測量該處純噪音 RMS 與語音 RMS 的差異 → 真實 SNR。
    • 頻譜圖:ffmpeg -i M -vn -lavfi showspectrumpic=s=1500x600:legend=1:scale=log out.png 並觀察。Hum = 平穩水平線(50/60Hz)→ Notch。Rumble = 低頻段 → High-pass。填滿語音頻段且波動的寬頻聲床 = 動態(水聲/風聲)→ ElevenLabs。HF hiss = 高頻明亮頂端。
    • 注意輸出版本是否已產出(壓縮/標準化/限制峰值)—— 這會限制可恢復的程度。
  2. 根據診斷結果與使用者共同決定方法(見上表)。若不確定,對兩種方法進行 A/B 比較。
  3. 先對短樣本進行 A/B 比較(投入前先驗證):切取約 15 秒包含停頓的樣本,對每個候選方法執行處理,將它們電平匹配,然後比較——用耳朵聽(真正的測試)與頻譜圖(停頓處變暗 = 雜音移除)及殘留電平。讓使用者選擇。
  4. 清理完整主檔: python tools/clean_voice.py videos/video-N/reference/<cut>.mp4 --method <chosen> [--model sh] → <cut>-clean.mp4(或 -clean-<model>.mp4)。影片串流複製(快速、無損、保留 4K60)。
  5. 電平透過 RMS 匹配保留,而非 LUFS(工具會自動執行)。切勿匹配整合 LUFS——因為它是有閾值的,且被移除的噪音會使其膨脹,導致語音過度放大而裁切。淨化版檔案的整合 LUFS 將低於原始噪音檔案;這是正常的(噪音原本墊高了數值),語音 RMS 未變。最終響度調整至 -14 LUFS 是 final-mix 步驟的工作。
  6. 為使用者提供場景內預覽(可選但建議):將乾淨音訊替換到合成預覽上 —— ffmpeg -i preview.mp4 -i <cut>-clean.mp4 -map 0:v -map 1:a -c:v copy -c:a aac -shortest preview-clean.mp4(影片完全相同,無需重新烘焙)。若要完整的 A/B 比較,也輸出 FULL_*.mp3 瀏覽檔案。
  7. 獲得批准後,重新連結管線: 將 timeline.json 的 "master" 指向淨化版檔案,使未來所有烘焙/混音都使用乾淨語音;必要時重新烘焙預覽。

需向使用者提出的決策

  • 方法(根據診斷結果)—— 若不確定則進行 A/B 比較。
  • 完全靜音間隙 vs 微弱環境聲床。 語音隔離會移除所有背景;在戶外拍攝中,完全靜音的間隙可能感覺像真空密封。若需要,提供添加低電平中性環境聲的選項。
  • ElevenLabs 的成本(約 1000 點/分鐘)—— 在完整主檔上執行前先確認。

原則(本專案風格)

  • 最少處理,達到效果即可。 目標是移除干擾,而非讓語音聽起來經過處理。優先選擇能清除雜音的最溫和方法;不要過度處理乾淨的音軌。
  • 先診斷,再選擇。 正確工具取決於雜音類型 —— 絕不能盲目增大去噪強度。本地頻譜/RNNoise 無法分離動態寬頻雜音;那是 ElevenLabs 的工作。
  • 投入前先 A/B 比較(及花費前)。在樣本上驗證;使用者耳朵決定。
  • 保留電平;響度是 final-mix 步驟的工作。 RMS 匹配加上峰值上限,此處不進行壓縮。
  • 非破壞性。 原始主檔不變;影片串流複製;輸出為新檔案。

工具快速參考

  • 清理:python tools/clean_voice.py IN.mp4 [--method eleven|rnnoise] [--model sh|cb] [-o OUT.mp4] [--no-preserve-loudness] [--keep]
  • 診斷:ffmpeg -i M -vn -af astats -f null - · ffmpeg -i M -vn -lavfi showspectrumpic=... out.png(然後檢視圖片)。
  • RNNoise 模型:tools/models/rnnoise/<model>.rnnn(sh、cb)。
  • 暫存樣本/頻譜圖放在暫存區,而非專案中。

完成 = 雜音已診斷、方法已選擇(必要時進行了 A/B 比較)、完整主檔已清理且電平保留、使用者已用耳朵確認批准、且 —— 獲得批准後 —— timeline.json 指向淨化版主檔。若出現雜音類型 → 方法的經驗教訓,則更新記憶。

Individual skills in this repo

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

raisaksham377-bot/youtube-shorts-ai-editor

Makes this repo's videos look like YOUR channel instead of the house default — interviews you for palette, fonts, wordmark, motion energy, delivery specs and SFX taste, then rewrites brand.md + remotion/src/brand.ts + remotion/src/fonts.ts together and renders a proof card so you SEE it. Use whenever the user wants to set up or change their brand, rebrand the repo, "make it my colors/fonts", change the accent color, set their wordmark, adjust the motion feel, or asks why their videos look like someone else's. Run it once before the first video. Not for per-video art direction (that is /make-tsx) and not for thumbnails, which are deliberately louder than the brand (that is /packaging).

raisaksham377-bot/youtube-shorts-ai-editor

Build a split-frame vertical Short/Reel (1080x1920) from talking-head footage — real face cropped into the bottom half throughout, bespoke motion-graphic beats + word-by-word captions in the top half. Use when the user wants a "vertical short", "reel", "9:16 video", "split-frame" format, asks to keep their face on screen the whole time while graphics play above it, wants an in-context app/UI mockup moment (like clicking a button in a browser) without cutting away from their face, or hits caption-pill-covers-my-face / no-GPU-rendering / audio-duration-mismatch problems while building one. Covers the crop-offset technique for framing the face, the caption-pill safe zone, the top-half-only UI-mockup scene pattern, the full pipeline from raw footage to final SFX mix, and the environment gotchas (no NVIDIA GPU, AAC priming gap, comp-native transcode). Topic-agnostic — this is a layout/technique skill, not tied to any one video's content. Builds on /clean-cut, /make-tsx conventions, and /suggest-sfx; doesn't rep...

raisaksham377-bot/youtube-shorts-ai-editor

Step 1 of the AI Video Editor pipeline — turn raw talking-head footage into a clean master cut. Use when the user wants to "clean cut", "cut the raw footage", "remove filler / dead air / bad takes", "tighten the pacing", produce cuts.json, run the cut editor, or render a cleaned preview/master for a video-N project in this repo. Covers audio extraction, AssemblyAI transcription, authoring cuts.json (keeps/cuts/fluff categorized), the cut policy (content-aggressive, pause-natural ~0.5s), QA + review docs, the local cut-editor UI, tight/natural previews, the final 4K60 render, and producing edited-transcript.json as the handoff to /make-tsx. Not for building TSX overlays (that is /make-tsx) or the raw TSX authoring rules (that is vidtsx-2d-generator).

raisaksham377-bot/youtube-shorts-ai-editor

Turn static SCREENSHOTS into a simulated screen recording (TSX) — a fake screencast with an animated cursor that eases to targets and clicks, a browser URL bar that updates per page, hard-cut navigations, in-page filter crossfades, smooth scroll, and a ken-burns zoom onto the payoff. Use when a beat needs to show a walkthrough of a web app / dashboard / settings page and you'd rather build it from screenshots than get (or ask for) a real screen recording — "fake a screen recording", "turn these screenshots into a screencast", "simulate clicking through the dashboard", "animate this UI walkthrough", "cursor moving through the app". Built on remotion/src/lib/screencast.tsx. This is a technique WITHIN step 2 (make-tsx): defer timeline/render/bake orchestration to make-tsx and raw crash-free TSX rules to vidtsx-2d-generator. Not for a single static page clone (use WebBrowserFrame directly) and not when the point is genuine proof of real speed/output (use a real recording).

raisaksham377-bot/youtube-shorts-ai-editor

Step 2 of the AI Video Editor pipeline — build the visual beats (Remotion TSX shots) over a project's master cut and bake a composited preview. Use when the user wants to add/edit overlays or full-screen animation segments, "make a shot / beat", implement an edit plan or a v2 update, retime a beat to the narration, re-render shots, or re-bake the video-N preview in this repo. Covers reading the plan + edited-transcript + brand + reusable kit, authoring shots library-first, syncing reveals to word times, updating timeline.json (cutaway vs overlay), rendering, verifying by screenshot, and baking with tools/bake.py. Defers raw TSX authoring rules to vidtsx-2d-generator and the cut itself to clean-cut.

raisaksham377-bot/youtube-shorts-ai-editor

Generates click-optimized YouTube packaging — 3 thumbnail bets under one fixed title, engineered for YouTube's built-in A/B/C thumbnail test, plus a value-forward description, then renders the thumbnails as real images. Use this whenever you want to package a long-form video or turn a video idea into titles and thumbnails. Triggers include how would you package this, title ideas for, thumbnail concept, package this video, A/B variations, and make this clickable. Calibrates to your channel's own CTR data if you have it. Long-form only, never Shorts. Not for non-YouTube copywriting.

raisaksham377-bot/youtube-shorts-ai-editor

Step 4 of the AI Video Editor pipeline — the SFX pass. Analyze a video's beats + narration and propose tasteful sound effects synced to them, drawing from (and growing) a shared, reusable SFX library, then render an SFX-mixed audition preview. Use when the user wants to "add SFX / sound effects", "suggest sfx", "score the transitions", "sound-design this beat", generate/source sound effects, build or extend the sfx library/catalog, author or audit a sfx-plan, or mix SFX over a video-N preview in this repo. Covers reading timeline + edited-transcript + brand §10, the library-first flow, generating misses with the ElevenLabs Sound Effects API, the per-video sfx-plan.json, the hard user-audit gate, and mixing with tools/mix_sfx.py (light voice ducking). Not the music bed (that is the final-mix step) and not the visual beats (that is /make-tsx).

raisaksham377-bot/youtube-shorts-ai-editor

Generate production-ready 2D TSX video files for VidTSX (Remotion-based) from a shot, scene, or video description. Use whenever the user wants to create or generate a VidTSX video, a 2D TSX shot or scene, an animated clip, title card, or rendered motion graphic — including when they describe a visual animation they want built, or say "make a shot", "build this scene", "generate the TSX", or "turn this into a video". Covers the mandatory file structure and composition config, dimension presets (horizontal/vertical/square), six style presets (minimalist, memphis, neo-brutalism, glassmorphism, neon, corporate), and the hard rules that keep renders from crashing, covering frame-based animation only (no useState/useEffect/setTimeout), strictly monotonic interpolate ranges, Easing.bezier not wrapper syntax, and the chroma-js and @remotion/paths import gotchas. Not for 3D/three.js compositions, general React work, or editing video files.

相關技能