Skip to main content

walkthru

Turn a sequence of application commands into an editable, re-renderable demo/tour artifact — and play that sequence while observers record video, draw visual cues, and narrate.

walkthru owns the representation (the Demo Document) and the playback/capture engine. It does not render the final video — it hands a validated artifact off to a renderer (the reelee ecosystem, Remotion, moviepy/ffmpeg, …). Owning representation, not pixels, is the load-bearing boundary of the whole design.

Two modes, one data model, one engine

  • Generative — an author supplies a Demo Document (commands + annotations); walkthru plays it while recording, with optional cues (highlight, spotlight, hotspot, callout, synthetic cursor), pauses, and narration.
  • Capture — a human operates the app manually; walkthru records the video and the underlying command stream and annotations, producing the same Demo Document.

The only difference between the modes is who fills in the document.

The core

play(demoDoc, executor, observers) -> Outcome

A pure higher-order function that walks the document and emits lifecycle events (onStepEnterbeforeCommandafterCommandonStepExit, onCueBegin/End, onNarration, …). It never records, renders, or speaks — every effect is an injected observer or port.

Quickstart

pip install walkthru
import asyncio
from walkthru import DemoDocument, Section, CommandStep, Command, Timing, play

doc = DemoDocument(
    id="demo",
    sections=[
        Section(
            id="s1",
            steps=[
                CommandStep(
                    id="step-1",
                    command=Command(id="app.open"),
                    timing=Timing(duration_ms=500),
                ),
                CommandStep(
                    id="step-2",
                    command=Command(id="app.save"),
                    timing=Timing(duration_ms=800),
                ),
            ],
        )
    ],
)


async def executor(command):  # your app's command bus (acture, Playwright, …)
    print("run", command.id)
    return {"ok": True}


asyncio.run(play(doc, executor))  # → runs step-1, step-2; returns an Outcome

Three runnable scripts in examples/ go further — a generative demo (commands + cues + narration, with JSON + WebVTT hand-off), a capture demo (record a human's actions into the same document and replay it), and a narration demo (segment → time → caption). All are pure-core, no optional deps:

python examples/generative_demo.py
python examples/capture_demo.py
python examples/narration_demo.py

Narration & captions

Narration is a track of editable text anchored to steps (the Descript model: text is the source of truth; audio and timing are regenerable). Turning authored text into timed, voiced narration with captions is a three-step, fully composable pipeline:

from walkthru import realize_narration, pace_steps_to_narration, resolve_timeline
from walkthru.adapters.export import narration_to_webvtt, narration_to_srt
from walkthru.adapters.synth import MixingSynthesizer, mixing_duration_ms

# 1. Synthesize each segment and time it from its own audio (anchor.duration_ms ← measured clip).
synth = MixingSynthesizer(
    voice_query="narrative_story", out_dir="tts"
)  # [synth] extra → ElevenLabs
realized = await realize_narration(doc, synth=synth, measure_ms=mixing_duration_ms)

# 2. (optional) Hold each beat at least as long as its line is spoken — narration-led pacing.
paced = pace_steps_to_narration(realized.document, policy="max")

# 3. Captions fall straight out of the resolved timeline — WebVTT (web-native) and SRT (universal).
open("demo.vtt", "w").write(narration_to_webvtt(paced))
open("demo.srt", "w").write(narration_to_srt(paced))

Because each segment is synthesized and measured independently, the beat boundaries fall out of resolve_timeline with no alignment math. Synthesis is the Synthesizer port and the audio assembler is an injected seam, so the whole flow is testable with fakes and pulls in no media stack; MixingSynthesizer (the [synth] extra) is the hosted-voice tier. See examples/narration_demo.py for an offline run (no API key) and DECISIONS.md §D8/§D12.

Ecosystem-biased, ecosystem-independent

The core and ports depend on nothing from our ecosystem. Integration with acture (the command layer), reelee (the renderer), and zodal ships as optional adapters. You can pip install walkthru / npm i acture-walkthru and use the core with your own adapters.

Packages

Package Registry Role
walkthru PyPI Python core + schema SSOT + render hand-off
acture-walkthru npm TS core + the live capture/play engine over acture

Status

The Python side is implemented: the Demo Document schema (the SSOT), the pure play/capture engine, dependency-free JSON + WebVTT + SRT export, segmented narration (synthesize → time → pace → assemble), and the first adapters (Playwright locator/recorder, the mixing/ElevenLabs voice synthesizer, and the reelee Ken Burns render target). The TypeScript package currently ships the schema seam — a Zod validator codegened from the Pydantic SSOT — and its live capture/play engine over acture lands next.

See PLAN.md for the implementation plan, DECISIONS.md for design decisions and deviations from the brief, and the repo's enhancement issues for the running development journal. Source documents live in misc/docs/.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

walkthru-0.0.17.tar.gz (173.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

walkthru-0.0.17-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

Details for the file walkthru-0.0.17.tar.gz.

File metadata

  • Download URL: walkthru-0.0.17.tar.gz
  • Upload date:
  • Size: 173.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for walkthru-0.0.17.tar.gz
Algorithm Hash digest
SHA256 d3fa15f2a30b43c364e917be5f9a444385863d63d3be34fc094de49e582baa6f
MD5 cfb32e5fb4a4c57b1dcb45c2df9d71e8
BLAKE2b-256 810b956a564c8d7dbd8a66973d7570d3da2087da58fe7c91bdc724ce0101e86d

See more details on using hashes here.

File details

Details for the file walkthru-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: walkthru-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 57.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for walkthru-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6dc740a282d41289ee74e3dd338bbb03dd4e75ee60a60b4bb9c7dad40067d62c
MD5 fc3add0b9c6a7927725ec07326a85cb8
BLAKE2b-256 14786215ba8fae59036f1299efc17f72e20e00898f85484e41e23579b1a391f3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.18

2 files

This release

0.0.17 This release

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page