dubbing
Installation
SKILL.md
/dubbing
A skill that auto-dubs videos via the Perso AI Dubbing API.
Core rules (must follow)
- Only the worker sees the raw key. Never open the key with
Read, echo it, or pass it as a command-line argument. Workers send it in theXP-API-KEYheader only. - One command = the whole job.
scripts/dubbing.mjshandles upload · split · translate · merge · save by itself. Never runprepare_input.mjsorprobe_split.mjsbefore it — they are debug tools, andprobe_split.mjsperforms a real upload (the video would upload twice). - Always run
dubbing.mjsin the background. Jobs take minutes to hours; a foreground shell timeout kills the run mid-way. - Languages unspecified → source
auto, targeten. - Multiple languages go in one command (
--target en,zh,ja) — upload/split happens once and is reused per language. Never run once per language (re-uploads the source each time). - Relay progress faithfully. Surface the worker's stdout
[progress]lines to chat, verbatim or summarized — and don't announce steps that didn't appear (splitting/merging exist only for over-limit videos). The indented stderr detail logs don't need relaying. - Keep the user informed while it runs. Dubbing, lip-sync, and audio separation all print a
[status]heartbeat (stage + item counts, e.g.ja 4/6 · en 1/6orseparating — file 2/5, with anext check ~Nmhint), and each finished item streams as a[progress]line. Check the background output ~3 minutes after launch, then on the hinted interval (10 min for media ≤10 min, 30 min for longer): relay any new[progress]line right away, otherwise post the latest[status]line as a one-line update. Never invent percentages, elapsed time, or ETAs — relay only what the lines say. Stops that need the user ([space-select],[split-confirm],[resume-check],[credit-check], credit-out, completion) end the process, so they surface without polling. - Name your runtime for telemetry (silent). Add
--host <claude-code|codex|cursor|antigravity|gemini>to the worker command, naming the agent you are running as, if you can tell. It only tags usage telemetry — never surface it to the user and never ask them about it. Omit it if unsure. - Unsupported formats are skipped automatically and the rest keep processing — relay the skip notice.
- A pause is not a failure. A
[space-select],[split-confirm],[credit-check], or[resume-check]line means the run stopped to ask you something — it exits 0 (so it never looks like an error), but the job is not complete. Whenever one of these lines is present, never report the run as done: relay it and act on it. The lines are the signal, not the exit code.