Communitygithub.com

voice-over: natural Chinese narration with per-line timing

Agent Skill that synthesizes narration and character lines into one wav per line with its measured length, ready to align captions and picture. Uses Alibaba Tongyi (Bailian) voices when DASHSCOPE_API_KEY is set, HyperFrames hosted voice next, and free macOS Chinese system voices otherwise, without stopping to ask.

What is voice-over: natural Chinese narration with per-line timing?

Explainer Video recipe step 2 (voice), from ymybxx/SoloMCN (MIT, created 2026-10-09), a Claude Code short-video studio whose README opens with a demo video and workbench screenshots. voice-over works inside SoloMCN's make-video and revise-video flows and also stands alone for trying voices. It picks the first engine that works: Tongyi TTS via a bundled script (batch lines from a TSV, speed 0.9 to 1.15, JSON output with seconds and per-sentence end times), HyperFrames hosted voice if logged in with credit, then macOS say converted to 48 kHz wav with ffprobe durations, and finally a captions-only cut with the reason noted. It warns that local Kokoro mangles Chinese, keeps one consistent voice per character, uses synthetic voices only with no cloning or imitation of real people, rewrites hard-to-say acronyms and numbers while captions keep the original text, and spot-checks with whisper-cli when available. In this recipe its per-line seconds become the at timestamps of khan-explainer's real-audio mode.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ymybxx/SoloMCN/tree/HEAD/defaults/skills/voice-over

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Dubbing

Synthesize lines into WAV files, one per segment, output the duration of each, register into audio_meta.json for the video production pipeline, and align subtitles. When fully unattended, do not ask questions or wait for replies; use whichever method is available, and clearly document it in the production notes.

1. Choose the method (use the first available)

  1. Tongyi TTS (most natural for Chinese, many voices): Use if environment variable DASHSCOPE_API_KEY is set.
    • Batch: Write narration as TSV with number<TAB>line, run node <skill-dir>/scripts/tongyi-tts.mjs --voice <voice> --lines voice/lines.tsv --outdir voice
    • Single line: node <skill-dir>/scripts/tongyi-tts.mjs --voice <voice> --text "line" --out voice/line-01.wav
    • Each line outputs JSON with seconds (duration) and sentences[].end_s (end time of each sentence) for subtitle alignment.
    • Speed via --speed (default 1.0, adjust between 0.9–1.15), generally no need to change.
  2. HyperFrames hosted dubbing: When no Tongyi key, HyperFrames is logged in (npx hyperframes auth status), and quota remains, use hosted dubbing from /faceless-explainer.
  3. macOS system Chinese voice (free, local, accurate): say -v "<voice>" -r <rate> -o voice/line-<number>.aiff "<line>", then convert to WAV with ffmpeg -i …aiff -ar 48000 -ac 1 …wav, read duration with ffprobe. Rate -r default ~180, can be 200–220 for urgent characters.
  4. If none work: Create a version without dubbing where subtitles carry the lines; state the reason in the notes.

Do not use HyperFrames' built-in local Kokoro for Chinese: Chinese pronunciation errors are many, mostly unintelligible; English-only lines are acceptable.

2. Choose the voice

  • First use the voice set by the content's series (or account): account.voice returned by get_item.
  • If not set, pick from voices.json in this skill directory based on character profile: voices with engine tongyi require a Tongyi key, macos voices are always available. If a Tongyi voice is set but no key is available, pick a system voice with similar gender and age.
  • Use one voice per character, keep consistent throughout the video; use the most stable voice for narration.
  • Use only synthetic voices; do not clone or imitate any real person's voice.

3. After synthesis

  • Read the duration of each file with ffprobe, register into audio_meta.json following the method for existing dubbing files in /faceless-explainer (place files in the project, indicate source), then run duration synchronization and subtitles.
  • For mispronounced words (English abbreviations, numbers, heteronyms), rewrite them into easier-to-pronounce forms before synthesizing that line; subtitles still show the original text. If whisper-cli is available locally, spot-check a few sentences by listening back.
  • In the production notes, clearly document: which method was used, which voices, and why it fell back to the next method.

4. Configuring the Tongyi key (for the user)

This skill does not go through the workbench settings. To use Tongyi, add the following to the project's .claude/settings.local.json (not committed to git):

{ "env": { "DASHSCOPE_API_KEY": "your-tongyi-key" } }

To apply to all projects, write it in ~/.claude/settings.json. You can also directly tell Claude Code: "Help me configure the Tongyi dubbing key." The key can be obtained from the Alibaba Cloud Bailian console.

Individual skills in this repo

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

Related Skills