hahadu4520/vlog-cut

tts-from-script

Use when the user has a narration script (script.json) and needs voiceover audio plus per-line timing data — synthesizes each line with edge-tts, probes durations, and writes timing.json + a merged narration.wav.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/hahadu4520/vlog-cut --skill tts-from-script

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

tts-from-script

What this does

Turns a script.json (see shared/schemas/script.schema.json) into:

  • <out>/tts/<id>.mp3 — one MP3 per line, id = <section_id>_<line_idx:02>
  • <out>/timing.json — Timing data (per-line start / end / duration, plus total_duration)
  • <out>/narration.wav — single merged audio track with line / section silences inserted

The Timing JSON is the contract every downstream skill reads.

When to use

Trigger when the user:

  • has finished writing the narration and wants voiceover
  • says "make TTS / 配音 / 口播 / 生成 narration"
  • needs a timing.json to feed into narration-cut or future burn-subtitles-cn

Do NOT use when:

  • the user already has their own recorded voiceover — that path is align-narration (v0.4, not yet built)
  • the user only wants to test a voice — point them at edge-tts --list-voices directly

How to call

bash
vlog-cut-tts --script /path/to/script.json --out /path/to/project_dir

Optional:

  • --gap-line 0.25 — override per-line silence
  • --gap-section 0.6 — override per-section silence

Defaults come from the script file (gap_line_sec, gap_section_sec), then fall back to 0.25 / 0.6.

Inputs (script.json)

json
{
  "voice": "zh-CN-XiaoyiNeural",
  "rate": "-5%",
  "gap_line_sec": 0.25,
  "gap_section_sec": 0.6,
  "sections": [
    { "id": "intro", "title": "引子", "lines": ["第一句。", "第二句。"] },
    { "id": "body",  "title": "正片", "lines": ["第三句。"] }
  ]
}

Outputs

<out>/
├── tts/
│   ├── intro_00.mp3
│   ├── intro_01.mp3
│   └── body_00.mp3
├── timing.json
└── narration.wav

timing.json matches shared/schemas/timing.schema.json. Each line carries start/end measured against the merged narration, so downstream tools can align cuts without re-probing.

Checkpoint (when called from vlog-cut-pipeline)

After this skill returns, stop and ask the user to listen to `narration.wav`. Common reasons to re-run:

  • voice / rate sounds wrong → edit script.json, rerun
  • a line has a wrong word or weird pronunciation → edit that line's text, rerun (cached MP3s only re-synth for changed lines if the file is missing — to force a re-synth, delete that one MP3)

Mark state.checkpoints.narration_approved = true before continuing.

Idempotency

If an MP3 already exists for a given line id, it is reused (no re-synth). Delete the file to force regeneration. timing.json and narration.wav are always rewritten.

Dependencies

  • edge-tts (Python, listed in pyproject.toml)
  • ffmpeg / ffprobe on PATH (used to probe durations and build the merged WAV)
같은 저장소의 Skills

더 많은 Skills

모든 Skills
hahadu4520
커뮤니티

align-narration

Use when the user has their OWN narration audio (m4a/mp3/wav) and needs the same timing.json + narration.wav that tts-from-script would emit. Calls whisper to transcribe, then groups segments into one line per section (using each section's optional headtext anchor in script.json). Triggers on "我自己录了配音 / 自带口播 / align my narration / 我有现成的录音". This is the v0.4 alternative to tts-from-script.

1시간 설치 수
1
GitHub Stars
49
업데이트
5월 8일
hahadu4520
커뮤니티

burn-subtitles-cn

Use when the user wants Chinese subtitles burned into a finished rough cut. Three CLIs — split (timing.json → paged subspages.json), build (subspages.json → ASS), burn (mp4 + ASS → mp4 with hard-burnt subs). Triggers on "加字幕 / 烧字幕 / burn subtitles / add Chinese subs". Designed for ≤12-char per-page Chinese subtitles with punctuation-priority line breaks.

1시간 설치 수
1
GitHub Stars
49
업데이트
5월 8일
hahadu4520
커뮤니티

narration-cut

Use when narration audio (timing.json + narration.wav) and an indexed asset pool (assetsindex.json) exist, and the user wants a rough cut. Three sub-tools — plan (draft a timeline), validate (check it before render), render (cut + concat + mux into mp4). Triggers on "对齐镜头 / 排时间线 / 出粗剪 / cut to narration / build timeline". Plan is a deterministic baseline; Claude usually rewrites timeline.json by hand before render.

1시간 설치 수
1
GitHub Stars
49
업데이트
5월 8일
hahadu4520
커뮤니티

vlog-cut-pipeline

Use when the user wants to take a script + a folder of raw clips all the way to a finished rough cut. Orchestrates tts-from-script → video-asset-index → narration-cut (plan / validate / render), with FOUR mandatory human-review checkpoints between stages. Triggers on "做视频 / 剪个视频 / 把这段文案做成视频 / make a video from this script". Do NOT bypass the checkpoints — Claude pauses, the user approves, then the next stage runs. State is tracked in /.vlog-cut/state.json.

1시간 설치 수
1
GitHub Stars
49
업데이트
5월 8일