Skip to content

xianyu110/ecommerce-video-skills / skills/multilingual-dubbing

multilingual-dubbing

Verified

多语言本地化配音:把中文带货视频本地化为英语、日语、韩语、东南亚语(印尼/泰/越/马来/菲律宾)、西语等版本——本地化改写口播(不是直译)、选对 edge-tts 音色、生成对应字幕与花字,并用同一份 storyboard 一键渲染多语言成片。Use when the user wants dubbing, 多语言, 本地化, 翻译配音, 出海, localize a product video for TikTok Shop US/UK/SEA, English voice-over, or multiple language versions of one video.

FileKindSize
SKILL.mdskill md4.6 KB
scripts/assemble.pyscript14.5 KB
scripts/make_bgm.pyscript2.8 KB
scripts/make_subs.pyscript5.6 KB
scripts/tts_edge.pyscript4.5 KB

scripts/make_bgm.py

View on GitHub
#!/usr/bin/env python3
"""Generate a royalty-free, upbeat background bed (pure numpy synthesis) so demos never
depend on copyrighted music.  For real campaigns use music you have rights to
(e.g. the platform's commercial music library).

Usage: python make_bgm.py 18 -o build/bgm.wav [--bpm 112] [--key 0]
"""
import argparse, wave
import numpy as np

SR = 48000


def midi(m):
    return 440.0 * 2 ** ((m - 69) / 12)


def make_bgm(seconds, bpm=112, key=0, seed=7):
    n = int(seconds * SR); t = np.arange(n) / SR
    beat = 60.0 / bpm; bar = beat * 4
    prog = [[60, 64, 67], [57, 60, 64], [53, 57, 60], [55, 59, 62]]  # I vi IV V
    out = np.zeros(n)
    for b in range(int(seconds / bar) + 1):
        a = int(b * bar * SR)
        if a >= n:
            break
        chord = [m + key for m in prog[b % 4]]
        # soft pad, one chord per bar
        L = min(n - a, int(bar * SR) + SR // 4); tt = np.arange(L) / SR
        env = np.minimum(1, tt / 0.08) * np.exp(-tt * 0.6)
        for m in chord:
            f = midi(m - 12)
            out[a:a + L] += env * (np.sin(2 * np.pi * f * tt) + 0.25 * np.sin(2 * np.pi * 2 * f * tt)) * 0.10
        # plucked 8th-note arpeggio
        for j in range(8):
            s = a + int(j * beat / 2 * SR)
            if s >= n:
                break
            L = min(n - s, int(0.35 * SR)); tt = np.arange(L) / SR
            f = midi(chord[[0, 1, 2, 1][j % 4]] + (12 if j in (3, 7) else 0))
            out[s:s + L] += np.sin(2 * np.pi * f * tt) * np.exp(-tt * 9) * 0.09
    # kick on every beat, hat on off-beats
    rng = np.random.default_rng(seed)
    for k in range(int(seconds / beat) + 1):
        s = int(k * beat * SR)
        if s >= n:
            break
        L = min(n - s, int(0.18 * SR)); tt = np.arange(L) / SR
        out[s:s + L] += np.sin(2 * np.pi * (50 + 70 * np.exp(-tt * 35)) * tt) * np.exp(-tt * 18) * 0.35
        h = s + int(beat / 2 * SR)
        if h < n:
            L = min(n - h, int(0.05 * SR))
            out[h:h + L] += rng.standard_normal(L) * np.exp(-np.arange(L) / SR * 80) * 0.04
    fade = np.minimum(1, t / 0.6) * np.minimum(1, np.maximum(0, (seconds - t) / 1.2))
    out *= fade
    return out / (np.max(np.abs(out)) + 1e-9) * 0.9


def write_wav(path, x):
    with wave.open(path, "wb") as w:
        w.setnchannels(1); w.setsampwidth(2); w.setframerate(SR)
        w.writeframes((np.clip(x, -1, 1) * 32767).astype(np.int16).tobytes())


if __name__ == "__main__":
    ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
    ap.add_argument("seconds", type=float)
    ap.add_argument("-o", "--out", default="build/bgm.wav")
    ap.add_argument("--bpm", type=float, default=112)
    ap.add_argument("--key", type=int, default=0, help="semitone transpose")
    a = ap.parse_args()
    write_wav(a.out, make_bgm(a.seconds, a.bpm, a.key))
    print("wrote", a.out)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall