Communitygithub.com

yyert123/shorts-voiceover

一句命令即可从纯文本脚本生成竖屏短视频(YouTube Shorts、TikTok、Instagram Reels;1080×1920 MP4),支持AI语音旁白、语音驱动字幕、Ken Burns图片动效、B-roll剪辑与渐变背景,自动闪避背景音乐并输出-14 LUFS标准响度。

shorts-voiceover 是什么?

Shorts Voiceover 是一个将纯文本脚本转换为可直接上传的竖屏短视频的 AI 技能。它支持 YouTube Shorts、TikTok 和 Instagram Reels 格式,输出 1080×1920 的 MP4 文件。该技能使用 Miragea 的 AI 语音引擎生成旁白,可以基于用户保存的声音 ID 或从公开语音片段克隆声音。不同于其他工具(它们仅根据文本长度估算字幕时间),shorts-voiceover 会先录制完整语音轨道,再对其进行真实转录,确保每条字幕的弹出时机完全与语音一致。技能支持 Ken Burns 动效对图片进行缩放;对视频片段进行 9:16 裁剪、循环或截取;当没有媒体文件时自动生成旋转渐变背景。背景音乐以 30% 音量循环播放并自动闪避(sidechain)以突出人声。最终视频集成了 -14 LUFS 响度和 -1 dBTP 峰值电平,完全符合短视频平台标准。运行会缓存每段场景的语音和转录结果,只有更改过的场景才会重新生成并计费。主要运行在本地 macOS/Linux 环境,需要 Python 3 和 ffmpeg 6.1+。

兼容平台~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,或者用户语音片段及其准确文字的公开 URL。建议用户 export MIRAGEA_VOICE_ID=...。仅克隆用户拥有或有权使用的声音。

  2. 编写脚本:每个场景一段短段落,场景之间用空行分隔,总字数 120-170 词,适合 45-60 秒的短视频。第一场景以钩子开头。可选地,在场景开头使用 @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 个大写单词提示,底部三分之一位置
图片裁剪为 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 词的短视频约 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.

相关技能