Communitygithub.com

PrunaAI/pruna-skills (WhisperX 逐词时间戳)

从音频生成逐词时间戳,用于歌词对齐、剪切安全线划定或视频字幕烧入前的时间码提取。

pruna-skills (WhisperX 逐词时间戳) 是什么?

WhisperX 技能为开发者提供从音频文件提取逐词级时间戳的能力,特别适合歌词对齐、精确剪切边界以及为视频编辑准备字幕源时间码。该技能基于 Replicate API 运行,需要设置 `REPLICATE_API_TOKEN`,并支持上传本地音频文件。核心输入是 `audio_file`(HTTPS URL),关键参数 `align_output: true` 开启逐词对齐,`initial_prompt` 可填入前几句歌词以提高对说唱/演唱语音的识别准确率。可选功能包括语言选择(ISO 代码)和说话人分离(`diarization`)。输出为 JSON 格式的完整转录及 SRT 字幕文件,便于在音乐视频工作流的“对齐”阶段直接使用。该技能依赖 `generation-diversity` 和 `pruna-api` 两个前置技能,并提供了明确的“何时不使用”替代方案,如音乐生成 (`music-2.5`)、语音旁白 (`gemini-3.1-flash-tts`) 和视频剪辑 (`video-editing`)。

兼容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/PrunaAI/pruna-skills/tree/HEAD/skills/audio/whisperx

在你喜欢的 AI 中提问

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

文档

前提条件

在生成之前,请先安装并加载这些技能(如果已通过 @pruna 加载则可跳过):

技能描述安装命令
generation-diversity编写任何生成式提示时使用——仪式性种子、明确结构、场景轴以及付费 API 调用前的质量门控。npx skills add PrunaAI/pruna-skills@generation-diversity -y
pruna-api在任何 Pruna 或 Replicate HTTP 调用之前使用——凭证、上传/轮询/下载、并行批处理和智能体安全。npx skills add PrunaAI/pruna-skills@pruna-api -y

或一次性安装全套技能:npx skills add PrunaAI/pruna-skills@pruna -y

请遵循每个技能的 生成前 / 工艺部分——此处不重复指南内容。

智能体习惯

在首次回复中,用反引号写出 `whisperx`,确认 REPLICATE_API_TOKEN(否则停止并给出 pruna-api 中的注册链接),然后询问所需输入。进行信息收集 → 在首次 POST 之前,先进行 generation-diversity 的澄清信息收集。当 何时不使用 更适合时,进行重定向。

何时不使用

请使用以下其他技能:

技能描述安装命令
music-2.5当用户想要一首带人声的原创 AI 歌曲时使用——带歌词的演唱、风格提示曲目或用于音乐视频的源音频。npx skills add PrunaAI/[email protected] -y
gemini-3.1-flash-tts当用户需要口语旁白或画外音时使用——解说音轨、纪录片台词或与生成视频配对的声音。npx skills add PrunaAI/[email protected] -y
video-editing当使用 ffmpeg 组装或抛光已渲染的片段时使用——拼接、淡入淡出、烧入字幕和隐藏式字幕、文字/徽标叠加、前后对比滑块、背景音乐、平台导出——或使用 Hyperframes 合成多层 HTML 组合视频。不适用于 AI 视频生成、提示工程或基于模型的视频编辑。npx skills add PrunaAI/pruna-skills@video-editing -y

环境

export REPLICATE_API_TOKEN=r8_...

HTTP / 工作流

优先使用仓库助手(它会上传本地音频并写入 JSON + SRT):

# 智能体:请遵循本 SKILL.md 中的阶段表 \
  --song output/my-mv/song.mp3 \
  --out output/my-mv/whisperx_transcript.json \
  --initial-prompt "前几句歌词有助于识别"

# 智能体:请遵循本 SKILL.md 中的阶段表 \
  --cuts output/my-mv/cut_manifest.json \
  --transcript output/my-mv/whisperx_transcript.json \
  --song output/my-mv/song.mp3

在音乐视频工作流中,请在 对齐 阶段运行此技能——参见 music-video。

生成前

  1. 按顺序阅读前提条件指南。
  2. 确认 audio_file(HTTPS URL——助手会上传本地文件)、language 和 align_output: true 以获得逐词级别的时间戳用于剪切对齐。列出输入时,请注明 REPLICATE_API_TOKEN(Replicate——而非 PRUNA_API_KEY)。
  3. 模型说明: 将 initial_prompt 设置为前几句歌词,以提高对说唱/演唱语音的识别准确率。可选 diarization 用于多人演唱。

必需输入

  • audio_file(HTTPS URL)

常见可选字段

  • language — ISO 代码,例如 en
  • align_output — true 用于逐词时间戳(剪切对齐必需)
  • initial_prompt — 前几句歌词
  • diarization — 说话人标签

典型后续步骤

此技能后的常见后续操作:

技能描述安装命令
music-video当用户想要完整的音乐视频时使用——原创歌曲或人声、表演片段、B-roll 以及歌词同步剪辑。npx skills add PrunaAI/pruna-skills@music-video -y
music-2.5当用户想要一首带人声的原创 AI 歌曲时使用——带歌词的演唱、风格提示曲目或用于音乐视频的源音频。npx skills add PrunaAI/[email protected] -y
video-editing当使用 ffmpeg 组装或抛光已渲染的片段时使用——拼接、淡入淡出、烧入字幕和隐藏式字幕、文字/徽标叠加、前后对比滑块、背景音乐、平台导出——或使用 Hyperframes 合成多层 HTML 组合视频。不适用于 AI 视频生成、提示工程或基于模型的视频编辑。npx skills add PrunaAI/pruna-skills@video-editing -y

Individual skills in this repo

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

PrunaAI/pruna-skills

Use when someone needs spoken narration or voiceover — explainer tracks, documentary lines, or voice to pair with generated video.

PrunaAI/pruna-skills

Use when someone wants an original AI song with vocals — sung lyrics, a style prompt track, or source audio for a music video.

PrunaAI/pruna-skills

Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.

PrunaAI/pruna-skills

Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits.

PrunaAI/pruna-skills

Use when crafting video or motion prompts for any generative model — dramaturgy, camera, physics-safe motion, frame anchors, and clip chaining.

PrunaAI/pruna-skills

Use when someone wants to edit an existing photo — change outfits or backgrounds, compose from reference images, or apply prompt-driven edits.

PrunaAI/pruna-skills

Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed.

PrunaAI/pruna-skills

Use when someone wants virtual try-on — dress a person in clothes from reference photos for fashion or ecommerce.

PrunaAI/pruna-skills

Use when installing the full Pruna generative media suite — all guides, tools, and workflows in one package.

PrunaAI/pruna-skills

Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants to edit an existing video with a text instruction — recolor, restyle, remove or add objects, change environment or lighting, update on-screen text, or apply optional reference-guided product and accessory edits. Not for a new clip from scratch or ffmpeg assembly.

PrunaAI/pruna-skills

Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p.

相关技能