Loading...
Loading...
Use when asked to create an explainer or walkthrough video (tutorial video, problem-solving video, worked-example deep dive, or micro-lesson) for a math problem (mathematics, geometry, algebra, functions, or motion/distance problems), based on a problem screenshot or text, with Chinese voice-over (GLM-TTS / Zhipu TTS), bilingual Chinese and English subtitles, and hand-drawn canvas animation rendered to MP4.
npx skill4agent add wy51ai/edulab edu-math-videoscript.json ──build_audio.py──► build/timeline.json + build/mix.wav + ../<name>.srt
(旁白) (GLM-TTS + 合成音乐) │
anim.js + engine.js ◄─────────────────────────┘ (按旁白时间点驱动动画)
└──node render.mjs video──► ../<name>.mp4S.at(k, f)template/engine.jsanim.jsscript.jsonepisode.jsonproblem.pngshared/pron.pyshared/pron.jsonexamples/cone-parallel/anim.jsstoryboard.mdscript.jsonscripts/new_video.shsetup_check.shmake_problem_png.pyproblem_boxes.pycontact_sheet.pySKILLWS$PWD.envnode_modulespron.jsonnew_video.shPROJPYsetup_check.sh/usr/bin/python3python3--checkmotionmake_problem_png.pytts= + − × ÷ / ^ √ ∠ △ ∥ ° ( )AC=3AC等于三x²x的平方zh--check--check未固定读音的生僻字/多音字: 0script errors: 0长[cháng]要[yào]求中点[zhōng]GLM_API_KEYsayboard()storyboard.mdnode render.mjs motion--previewstills autobuild/sheet.pngengine.jsanim.jsnode_modulespackage*.jsonWSbash SKILL/scripts/new_video.sh "$PWD" <ascii_folder_name> # WS 就是当前目录
bash SKILL/scripts/setup_check.sh WS/<ascii_folder_name>new_video.shpron.pypron.jsonnode_modulesnpm installWSPY -m pip install --user numpy requests pypinyin pillownew_video.shERROR: ... is where the skill is installedchuichuiGLM_VOICE.envGLM_API_KEY~/.config/math-problem-video/.env.envTTS_ENGINE=autosetup_check.shsetup_check.shALL OKcd PROJ && PY build_audio.py --say "你好,我们来看一道数学题。"WROTE build/say_xxxx.wavvoice: ...edge:say:problem.pngPY SKILL/scripts/make_problem_png.py --text "完整题目" --mark "条件1" "条件2" ... "所求" --out PROJ/problem.pngsrcWsrcHboxesPROJ/problem_boxes.py cropproblem.pngproblem_boxes.py gridproblem_boxes.py checkanim.jsPROBLEM*.preview.png*.check.pngepisode.jsonscript.jsonepisode.jsontitleoutput_name斜边中线_Median_to_Hypotenusepop_scenesscript.json{"scene": "English ID", "lines": [{"zh","tts","en"}, ...]}introoutrostoryboard.mdtemplate/storyboard.md| scene ID line number | narration point | point | move | retain | board notes |storyboard.mdcd PROJ && PY build_audio.py --check ; cat build/pron_report.txtERRORscript.jsonttsSC.<id>anim.js⚠ 多音/生僻[pinyin]wordspron.jsonok未固定读音的生僻字/多音字: 0script errors: 0anim.jstemplate/anim.jsPROBLEMTAGSfig(st)SC.<id> = (lt, S) => {...}S.P(S.at(k, f), duration)glow(..., bump(lt, at(k)))slideSegmovePolycamTweencountToboard()bl(line number, text, S.at(k, f), lt)stamp()PY build_audio.py --checkcd PROJ && PY build_audio.py --preview && node render.mjs motion && node render.mjs stills auto && PY SKILL/scripts/contact_sheet.py .motionSTATICMOVEstills autoFAILED: page erroranim.jsbuild/sheet.pngsheet_1.pngsheet_2.pnganim.jsmotion check passedcd PROJ && PY build_audio.py && PY build_audio.py --asr && node render.mjs stills auto && PY SKILL/scripts/contact_sheet.py .build/tts/--asrbuild/asr_report.txtmix + srt written--asr字母读错的句子: 0ASR SKIPPEDcd PROJ && node render.mjs video 6 # 6 = 并行浏览器页数(不是帧率!帧率固定 30)WS/<output_name>.mp4WS/<output_name>.srtWSpron.json| Incorrect approach | Correct approach |
|---|---|
Create the project in another directory that already has | WS is always the user's current directory. Use |
| Copy code from another video folder, such as a chemistry project | Create the project from this skill's |
Invent settings such as | The only model is |
Assume | The argument is the number of parallel processes. Use |
Write | An annotation applies only to the immediately preceding character: |
Write expressions such as | Write |
| Place an arbitrary problem screenshot at (50,50) with a size of 400×400 | Use |
Schedule animation with an absolute timestamp such as | Use |
| Deliver the video without inspecting the rendered images | Inspect |
Manually write | This is unnecessary: pron.py automatically splits adjacent letters into |
Invoke TTS while | Resolve it to zero; otherwise, the system may spend money synthesizing incorrect pronunciation |
Add common words to | Annotate only characters that may be mispronounced. Replacing words with homophones damages phrasing, such as |
| Put more than about 20 characters in a clause without punctuation | Add commas at natural breathing points and keep clauses at 18 characters or fewer. |
Fail to notice that | Zoom in on the text during review. make_problem_png.py automatically switches fonts |
Introduce curly quotation marks such as | JSON syntax requires straight English quotation marks ( |
| Draw everything at once and then add only one line or label per narration line, leaving all reasoning on the board | Every line must contain point → move → retain. Slide equal elements until they overlap, use |
| Draw a separate top-view diagram beside the original when a top view is needed | Rotate the same 3D model with |
| Put three or four knowledge points into one narration line | Use one point per line and introduce one element in sync with the visuals |
.envscript.jsonpron.json