# Energy after a stroke: rebuild kit The two films at sghadimi.com/animations/energy-after-stroke/ were made with these files. Each film is a web page drawn frame by frame (`render(t)`), filmed with Playwright and joined with ffmpeg, with a narration track made line by line. ## English (Kokoro, voice af_heart) 1. Write the scenes in `english/script_en.json` (8 scenes: hook, why, 5 ways, end; numbers as words). 2. `python3 english/make_audio_en.py af_heart 1.0` writes `voice_en.wav` and `timing_en.json`. Model files: GitHub release thewh1teagle/kokoro-onnx `model-files-v1.0`. 3. `python3 english/check_en.py voice_en.wav timing_en.json` checks every sentence with Whisper turbo (sherpa-onnx). Target: 0 word errors. ## Persian (Gooya Bozorg v1.5, a Persian Chatterbox fine-tune, CC BY-NC 4.0) 1. Captions in `persian/script.json`; the text the voice reads in `persian/lines_fa.txt` (same order; vowel marks where the voice guesses wrong: بَدَن, چُرتِ, and the ezafe kasra). 2. The model runs on GitHub Actions (`persian/persian-tts.yml`): `run2.py SEED [lines]` makes every line, `run3.py` makes variants and checks each take's vowels with a phoneme recognizer (wav2vec2-lv-60-espeak). Three takes per line, more for weak lines. 3. `persian/pick.py` keeps the clearest take of each line (Whisper turbo, character error rate); `persian/make_audio3.py` joins them into `voice_gooya.wav` and `timing_gooya.json` (hand picks in `OVR`). ## Picture and film 1. `python3 render/build.py english/anim_en.html timing_en.json page.html` (or `persian/anim_fa.html` with the Persian timing). 2. `python3 render/shots.py 5.9 17.6 ...` to look at the busiest moments first. 3. `TM=timing_en.json PD=parts PAGE=page.html python3 render/render.py` renders one MP4 per scene at 1080×1920, 30 fps, and a concat list. 4. `TM=timing_en.json python3 render/music.py` makes the soft pad. Mix: voice (highpass 70 Hz) + music at 0.07 (lowpass 1800 Hz), alimiter 0.95, AAC 160k, `-movflags +faststart`.