Communitygithub.com

yyert123/shorts-voiceover

透過一條指令將純文字劇本轉換為完成的直式短影片(YouTube Shorts、TikTok、Instagram Reels;1080x1920 MP4),具備 AI 語音旁白、依據真實語音時間戳的逐詞字幕、圖片 Ken Burns 動態效果、裁切與循環的 B-roll 片段或動態漸層背景、自動閃避背景音樂與 -14 LUFS 響度標準。

shorts-voiceover 是什麼?

這個技能讓開發者只需提供一個純文字劇本,就能自動產出符合平台規格的直式短影片。與其他工具不同,它並非根據文字長度猜測字幕時間,而是先完成語音合成後再進行語音辨識轉錄,因此每句字幕都能精準對應實際說話時間。使用者可以指定儲存的 AI 語音或透過聲音片段複製個人語音,並支援多場景分段處理:每個場景可獨立設定背景(圖片、影片或自動漸層動畫),系統會自動進行 9:16 裁切、Ken Burns 縮放、背景音樂閃避及 -14 LUFS 的響度標準化。主要支援 Miragea 語音 API,適用於 Claude Code、Cursor 等命令列執行環境的 AI 代理,能將部落格文章、技巧清單或故事快速轉換為 YouTube Shorts、TikTok 或 Instagram Reels 的 MP4 影片。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/yyert123/miragea-skills/tree/HEAD/shorts-voiceover

在你喜歡的 AI 中提問

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

說明文件

短影片語音旁白

輸入劇本,產出可直接上傳的短影片。不同於其他工具根據文字長度猜測字幕時間,此技能會先完成語音軌道後再進行轉錄,確保每條字幕精準對應實際說話時間。

使用時機

  • 「將這段劇本 / 這些技巧 / 這篇文章轉換為 Short(或 Reel、TikTok)。」
  • 「製作一部無臉短影片,附帶語音旁白和字幕。」「使用我的聲音。」
  • 「從這些劇本製作 5 部短影片」-> 每個劇本檔案執行一次。

步驟

  1. 確認已設定 MIRAGEA_API_KEY(切勿輸出顯示)。語音:使用者的 Miragea 語音 ID,或一段公開聲音片段網址及其精確文字。建議執行 export MIRAGEA_VOICE_ID=...。僅複製使用者擁有或有權使用的語音。

  2. 撰寫劇本:每個場景一個短段落,場景間以空白行分隔,總字數 120-170 字約可製成 45-60 秒的 Short。第一場景以吸引人的鉤子開頭。可選擇在某場景開頭使用 @file 指定背景:

    三個讓任何語音旁白聽起來更專業的小技巧。
    
    @broll/desk.mp4
    首先,在小房間裡錄音,使用軟質家具。回音比噪音更難處理。
    
  3. 渲染:

    python3 scripts/short.py tips.txt --voice VOICE_ID                       # 使用漸層背景
    python3 scripts/short.py tips.txt --media ./broll --music bed.mp3        # 使用使用者的圖片/片段 + 音樂
    
  4. 從輸出的 JSON 中提供使用者 video 和 srt 路徑。提供編輯選項:修改某場景文字後重新執行;僅該場景會重新語音合成,其餘場景從快取中取得。

自動化處理

步驟說明
語音每個場景使用 Miragea 語音合成;場景間 0.18 秒呼吸停頓
字幕時間完成的語音軌道由 Miragea 轉錄;1-3 字大寫提示,置於畫面下方 1/3 處
圖片裁切為 9:16,每個場景交替使用緩慢縮放
片段裁切為 9:16,循環或修剪至場景長度,移除原始聲音
無媒體動態漸層背景(4 種色板,循環切換)
音樂循環播放,音量 30%,在語音下方進行側鏈閃避
響度整合 -14 LUFS,最高 -1 dBTP(符合 Shorts/TikTok/Reels 標準)
重新執行每個場景的語音和轉錄內容皆會快取;未修改的場景不重複計費

選項

標誌預設值功能說明
--voice ID / --ref-url URL --ref-text TEXT環境變數使用已儲存的 Miragea 語音,或從公開片段複製語音
--media DIR無在未指定 @file 的場景中使用的圖片/片段,按檔名排序
--music FILE無背景音樂,自動閃避
--lowercase關閉使用句子大小寫字母字幕
--no-captions關閉跳過字幕(不產生轉錄費用)
--modelexpressive或 standard
-o FILESCRIPT.short.mp4輸出檔案路徑

費用與限制

語音:依字元計費(一篇 150 字的 Short 約 850 個字元)。字幕時間:依已完成語音軌道的長度,每秒 3 點(25 秒約 75 點);後續從快取讀取免計費。即時費率:GET https://miragea.ai/v1/capabilities。每個場景不得超過 2,000 個字元。若總時長超過 3 分鐘(YouTube Shorts 上限)會顯示警告。

疑難排解

  • media file not found -> @ 後的路徑是相對於劇本檔案或 --media 資料夾。
  • No such filter: gradients -> ffmpeg 版本低於 6.1;請升級,或傳入 --media 參數使用圖片。
  • 401 密鑰錯誤,402 請至 miragea.ai 儲值,429 請稍後重新執行(已快取的內容不會重複計費)。

請僅使用您擁有版權的音樂和影像素材。請參閱 examples/ 目錄中的實際劇本與輸出範例。

Individual skills in this repo

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

yyert123/remotion-narration

Turn a video script into per-scene voiceover for Remotion in one command - one MP3 per scene in a saved or cloned voice, measured durations converted to durationInFrames, word-level captions in Remotion's Caption format, and an SRT. Use when building a narrated video with Remotion (or any React/code video tool), when the user asks to "add voiceover", "narrate these scenes", "sync scenes to the narration" or "add captions that follow the voice". Voice and timing by Miragea, no GPU or ElevenLabs a

yyert123/screen-recording-voiceover

Turn a silent screen recording (product demo, tutorial, walkthrough, bug repro) into a narrated video in one command. Finds the steps in the recording, helps write one line per step, voices each line with a saved or cloned voice, starts every line exactly at its step, speeds up or freezes frames automatically when a line runs long ("freeze-sync"), mixes optional ducked music, normalizes loudness and writes SRT/VTT captions (optionally burned in). Use when the user wants to add AI voiceover or na

yyert123/video-captions

Caption any video or audio file in one command. Produces clean, readable SRT and WebVTT subtitles (whole words, 42-char lines, proper timing) and can burn them into an MP4, including big centred 1-3 word "pop" captions for TikTok, Reels and YouTube Shorts. Use when the user asks to add subtitles or captions to a video, make an SRT/VTT file, transcribe a talk or podcast into captions, or burn captions into a short-form video. English-first; speech recognition by Miragea.

相關技能