# Ra Audio To Subtitles

Generate production subtitle artifacts from the final narration audio or final merged...

- Repository: https://github.com/Pluviobyte/rnskill (1706 stars)
- Category: Media
- License: see repository
- Last updated: 2026-09-21
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Pluviobyte/rnskill --skill ra-audio-to-subtitles -g -a claude-code -y`
Codex: `npx skills add Pluviobyte/rnskill --skill ra-audio-to-subtitles -g -a codex -y`
Cursor: `npx skills add Pluviobyte/rnskill --skill ra-audio-to-subtitles -g -a cursor -y`
Gemini CLI: `npx skills add Pluviobyte/rnskill --skill ra-audio-to-subtitles -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Pluviobyte/rnskill`

## Description

Generate production subtitle artifacts from the final narration audio or final merged video using Volcengine Doubao ASR word timestamps. Use for local IndexTTS2 videos, Xiaohei page videos, talking-head delivery subtitles, SRT/VTT export, or whenever subtitle timing must match the final audio. Do not use script-length interpolation for final deliverables.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 真实时间戳字幕

Use the final audio stream as the only timing source. Never estimate final
subtitle timing from character count, scene duration, TTS segment duration, or
fixed delays.

## Required workflow

1. Finish and concatenate narration first. If the user recorded or merged a
   video, use that final merged media instead.
2. Run `scripts/generate_subtitles.py` against the final media and the exact
   narration script.
3. Inspect phrase segmentation. Keep English product/model tokens intact,
   merge isolated one-word fragments, and place connectors such as `比如说`,
   `但是`, and `只是` with the phrase they introduce.
4. Render captions from `captions.json`; export `captions.srt` for Bilibili,
   YouTube, editing software, and archive.
5. Require `caption-qc.json` to report `status: pass` before final render or
   delivery. The gate includes alignment, overlap, fragments, connector splits,
   caption duration, and reading speed.
6. If ASR fails or alignment coverage is below the gate, stop. A character-
   count estimate may be used only for an explicitly labeled scratch preview.

## Commands

Project with `narration_segments.json`:

```bash
python3 .claude/skills/ra-audio-to-subtitles/scripts/generate_subtitles.py \
  <project>/media/final-voiceover.mp3 \
  --script <project>/narration_segments.json \
  --out-dir <project>/media/captions
```

Recorded or merged video with a Markdown handoff containing `- 口播：` lines:

```bash
python3 .claude/skills/ra-audio-to-subtitles/scripts/generate_subtitles.py \
  <project>/merged.mp4 \
  --script <project>/handoff.md \
  --out-dir <project>/media/captions
```

Health check:

```bash
python3 .claude/skills/ra-audio-to-subtitles/scripts/generate_subtitles.py --doctor
```

Offline regression test with an existing Volcengine response:

```bash
python3 .claude/skills/ra-audio-to-subtitles/scripts/generate_subtitles.py \
  <audio> --script <script> --asr-result <volcengine-result.json> \
  --out-dir <output>
```

## Output contract

The rest: https://github.com/Pluviobyte/rnskill/blob/HEAD/skills/ra-audio-to-subtitles/SKILL.md
