andyhuo520/vibe-knowledge / skills/ai-teardown
ai-teardown
Unverified「AI 拆机课」系列课工作室:输入一个主题(AI 产品、开源项目/书、人物历史、软件教程),产出由浅入深、每句话有出处的中文讲解视频系列 + 每节互动版 + 课程总页。流水线:收集资料 → 确认对象与课时 → 大纲 → 逐节旁白(MiMo 克隆音色 + 逐字对齐)→ scenes.json 画面编排(Notion 极简手绘引擎 / 马卡龙模板引擎,IconPark 图标与插画、Noto 动态 emoji、AntV X6 流程图、像素讲解小人、截图圈注、终端录屏)或 film.js 代码成片(cine 引擎:Three.js、粒子、着色器、真片段叠加、曲库配乐)→ Hyperframes / 无头 GPU 逐帧 1080p 渲染 → Artifact 发布 → 课程总页 + 导学视频。触发:做系列课 / 做课程视频 / 把某本书或某个开源项目做成课 / 科普讲解视频 / 教学视频 / 课程地图 / 导学视频 / 互动课件 / 「拆机课」「上手课」「实战课」「编排课」/ 王炸讲解片 / 用真实会话和成片教人做视频。不用于:单支宣传片(用 promo-video)、单张信息图、纯文章写作。
engine/cine/tools/loopbed.py
View on GitHub#!/usr/bin/env python3
"""曲库的曲子大多两分钟左右,一节课四五分钟:把 pick_music.py 裁好的 bgm.wav 按小节循环接长。
循环段从对齐点后第 8 小节开始、到曲尾淡出前的最后一个整小节结束;接缝放在小节线上,用一小节等功率交叉淡化,拍子网格不断。
用法:python3 cine/tools/loopbed.py <bgm.wav> <输出.wav> --seconds 340 --bpm 128.5 --anchor 7.44"""
import argparse
import math
import wave
import numpy as np
def main():
ap = argparse.ArgumentParser()
ap.add_argument("src"); ap.add_argument("out")
ap.add_argument("--seconds", type=float, required=True)
ap.add_argument("--bpm", type=float, required=True)
ap.add_argument("--anchor", type=float, required=True, help="pick_music.py 的 --hit-at:这一刻是小节线")
a = ap.parse_args()
with wave.open(a.src, "rb") as w:
sr, ch = w.getframerate(), w.getnchannels()
x = np.frombuffer(w.readframes(w.getnframes()), np.int16).reshape(-1, ch).astype(np.float64)
dur = len(x) / sr
n = int(a.seconds * sr)
if dur >= a.seconds:
y = x[:n]
else:
bar = 4 * 60 / a.bpm
ls = a.anchor + 8 * bar
le = a.anchor + math.floor((dur - 4.0 - a.anchor) / bar) * bar # 避开曲尾淡出
if le - ls < 4 * bar:
raise SystemExit("曲子太短,凑不出 4 小节以上的循环段")
xf = int(bar * sr)
k = np.linspace(0, np.pi / 2, xf)[:, None]
fin, fout = np.sin(k), np.cos(k)
y = np.zeros((n + len(x), ch))
first = x[: int(le * sr) + xf].copy()
first[-xf:] *= fout
y[: len(first)] += first
body = x[int(ls * sr): int(le * sr) + xf]
pos, step = int(le * sr), int(le * sr) - int(ls * sr)
while pos < n:
seg = body.copy()
seg[:xf] *= fin
seg[-xf:] *= fout
y[pos: pos + len(seg)] += seg
pos += step
y = y[:n]
print(f"循环段 {ls:.2f}–{le:.2f}s({(le - ls) / bar:.0f} 小节),接成 {a.seconds:.1f}s")
m = int(2.0 * sr)
y[-m:] *= np.linspace(1, 0, m)[:, None]
with wave.open(a.out, "wb") as w:
w.setnchannels(ch); w.setsampwidth(2); w.setframerate(sr)
w.writeframes(np.clip(np.round(y), -32768, 32767).astype(np.int16).tobytes())
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |