Communitygithub.com

yyert123/screen-recording-voiceover

将无声屏幕录制(产品演示、教程、操作指南、Bug 复现)一键转化为带配音的视频。自动找出录制中的步骤,帮助为每步撰写一句话,用已保存或克隆的语音朗读,让每句话精确对齐到其步骤开始,在句子过长时自动加速或冻结画面(“冻结同步”),可选混入背景音乐、标准化响度并生成 SRT/VTT 字幕(可选择烧录到视频中)。

screen-recording-voiceover 是什么?

该技能专为需要为屏幕录制快速添加 AI 配音的开发者或内容创作者设计。它解决了手动同步语音与画面动作的繁琐问题,能自动将无声的屏幕录像(如产品演示、教程、Bug 复现)转化为带同步语音旁白的视频。用户只需提供一个屏幕录像文件,技能便会自动分析视频中的关键步骤(如点击、切换),生成一个脚本模板。用户可以编辑这个模板,为每步写一句对应的旁白。然后,技能会调用 Miragea TTS(支持已有语音或基于简短音频克隆新语音)将旁白转化为语音,并精确控制每句话的开始时间,使其与视频中的对应动作同步。对于比其对应视频片段更长的旁白,技能支持自动加速或“冻结”最后画面直到旁白结束,确保后续同步不受影响。它还支持烧录字幕、添加背景音乐(自动闪避人声)、标准化响度等功能。该技能主要作为一个命令行工具使用,需要 Python3 环境和 Miragea API 密钥。

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

在你喜欢的 AI 中提问

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

文档

屏幕录制配音

为屏幕录制配音的慢工不在于声音本身,而在于同步:将每句话和它所描述的点击动作对齐,并修复句子比动作长的情况。本技能自动完成这两件事,绝不让旁白漂移或重叠。

使用时机

  • “为这个演示 / 教程 / 屏幕录制添加配音。”
  • “我录了无声屏幕,请旁白”或“我不想用自己的声音/口音。”
  • “让旁白匹配屏幕上的操作。”

步骤

  1. 检查是否设置了 MIRAGEA_API_KEY(切勿打印)。语音:询问一次用户的 Miragea 语音 ID,或用户声音片段的公开 URL 及其准确文字。建议 export MIRAGEA_VOICE_ID=... 避免重复询问。仅克隆用户拥有或有权使用的语音。

  2. 找出步骤并创建脚本模板:

    python3 scripts/scenes.py demo.mp4      # -> demo.frames/*.jpg, demo.frames/steps.json, demo.script.txt
    
  3. 查看帧 在 demo.frames/ 中(你可以读取图片),为每步写一句清晰的句子到 demo.script.txt 中对应时间戳后,替换 # step 注释。保持在 ~N words 的提示范围内,使句子在下一步开始前能够读完整。可以自由合并、移动或删除步骤。如果用户提供了自己的脚本,则将句子放到匹配的时间戳处。

  4. 不花钱检查时间效果:

    python3 scripts/voiceover.py demo.mp4 demo.script.txt --dry-run
    

    如果用户希望零冻结帧,请缩短任何标记为 will freeze 的句子。

  5. 渲染:

    python3 scripts/voiceover.py demo.mp4 demo.script.txt --voice VOICE_ID            # 字幕输出为文件
    python3 scripts/voiceover.py demo.mp4 demo.script.txt --burn --music bed.mp3      # 烧录字幕 + 背景音乐闪避
    
  6. 将打印的 JSON 中的路径提供给用户:video(已配音的 MP4)、voice_track(供编辑器使用的 WAV)、srt/vtt。如果 frozen_seconds 大于零,请提一下。

  7. 要修改某句话,编辑脚本并再次运行步骤 5:未更改的句子将从缓存中获取,无需额外费用。

脚本格式

[00:00] 欢迎使用 Acme。这是登录后看到的仪表板。
[00:04] 点击新建项目,输入名称,并选择应拥有它的团队。
[01:02.5] 就这样。你的项目已准备就绪。

可接受的时间戳格式:[mm:ss]、[h:mm:ss]、mm:ss.s、12.5s。以 # 开头的行是注释。

同步原理

  • 每句话精确从其时间戳开始;在下一步骤开始前保留 0.25 秒的呼吸空间。
  • 比其时间段更长的句子会被加速,最多到 --max-speed(默认 1.15 倍,仍显自然)。
  • 如果仍然无法容纳,视频会定格在该步骤的最后一帧,直到句子结束,然后继续。后续的句子会相应偏移相同的时间量,因此同步永远不会丢失。
  • 字幕的时间基于每句话的实际朗读时长(最多 2 行 x 42 个字符)。
  • 响度标准化至约 -16 LUFS(YouTube/网络标准)。如有背景音乐,会自动在语音下方闪避。

选项

标志默认值作用
--voice ID / --ref-url URL --ref-text TEXT环境变量已保存的 Miragea 语音,或从公开片段克隆(提供准确文本可获得更便宜的 1 倍费率)
--modelexpressive或 standard
--max-speed1.15冻结画面前的最大加速倍数
--burn关闭将字幕烧录到视频中
--music FILE无背景音乐,循环播放并自动闪避
--keep-audio关闭保留录制原声,低音量置于语音之下
--dry-run显示带预估语速的时间槽计划;不调用 API
-o FILEVIDEO.voiceover.mp4输出路径;原文件不会被修改

费用与限制

语音按字符由 Miragea 计费(使用已保存的语音或准确的参考文字为 1 倍费率;实时费率见 GET https://miragea.ai/v1/capabilities)。一个 3 分钟的演示通常需要 2,000-3,000 个字符。每句话不能超过 2,000 个字符。在 Miragea 的上传端点推出之前,参考片段必须是公开 URL。

故障排除

  • no timestamp / not after the previous line -> 修复错误中提到的脚本行。
  • no voice chosen -> 传递 --voice 或设置 MIRAGEA_VOICE_ID。
  • 401 密钥错误,402 需要在 miragea.ai 充值,429 请稍候重试(已缓存的句子不会重复计费)。
  • scenes.py 生成的步骤过多或过少 -> --threshold 0.02(更多)/ 0.08(更少),--min-gap。

参见 examples/ 获取真实脚本、计划 JSON 及其生成的字幕。

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/shorts-voiceover

Make a finished vertical short video (YouTube Shorts, TikTok, Instagram Reels; 1080x1920 MP4) from a plain-text script in one command, with AI voiceover in a saved or cloned voice, word-timed pop captions taken from the real speech, Ken Burns motion on images, cropped and looped B-roll clips or animated gradient backgrounds, auto-ducked background music and -14 LUFS loudness. Use when the user asks to turn a script, tips list, story or blog post into a Short/Reel/TikTok, make a faceless short wi

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.

相关技能