CLI
Every visotalk command, its options, and what it costs.
visotalk is an npm package. Run it as npx visotalk@latest <command>; keep @latest, because a copy installed earlier would
run instead. Or install it once with npm i -g visotalk@latest. Node.js 22.12 or later is needed. validate and schema need nothing
else; the rest need what doctor checks.
Set up
| Command | What it does | Cost |
|---|---|---|
doctor [--fix] [--json] | Checks what rendering needs (Chrome, the narration voice, the word-timing model, Python, ffmpeg) and exits 0 when all is ready. --fix installs what it can into ~/.visotalk; ffmpeg and Python 3.9 or later are yours to install | about 1 GB the first time |
schema [tags | actions | hooks] [--json] | The vocabulary the validator knows: every tag and attribute, action, anchor and hook | free |
Write and check
| Command | What it does | Cost |
|---|---|---|
init doc.tsx --lines lines.json [--id ID] | A valid skeleton from your script, {"title", "lang", "lines": [{"id", "text", "say", "intent"}]}: the narration, nothing drawn. It never overwrites a document, and it starts the narration in the background | seconds |
validate doc.tsx [--json] [--limit 30] [--anchors] | Syntax, references, anchors and the code of your parts, one issue per line at doc.tsx:line:col, most with a fix. --anchors lists each word anchor with the words it finds in the line; --json gives the issues as data | free |
prepare doc.tsx | Narration audio per line and word times, written to voice.json. init and the first still, sheet or qa start it in the background; until it is ready, lines are timed from their words and the output says so | minutes the first time |
check doc.tsx [--samples 40] | Renders sampled frames twice, the second time in random order, and compares them: the determinism check | seconds |
Look
| Command | What it does | Cost |
|---|---|---|
sheet doc.tsx [--at 0.85] [--shots] [--out FILE.png] | One frame per line as a contact sheet. Works from the skeleton, before anything is drawn. --shots: one frame per shot of a video recording, at its middle, with each shot's seconds | seconds |
still doc.tsx --line scene/line [--at 0.85] [--out FILE.png] or --time SECONDS | One full-size frame (1920×1080). It prints the sentence spoken then, the phrases it is anchored on, and what the engine measured on the frame: where the ink is, how much room is left on each side, and any text crossed, overlapped, past an edge or under the captions | seconds |
qa doc.tsx [--per-line 3] [--frames] [--json] [--limit 30] | Overflow, clipping, text over text or cut by a shape, text under the captions, a target no part registers, an object on screen for under two seconds and anchors on a weak alignment, on sampled frames. It writes qa.json and sheet.png, and exits 1 on any issue | seconds |
Render, play and share
| Command | What it does | Cost |
|---|---|---|
render doc.tsx [--out DIR] [--fps 30] [--png] [--concurrency N] [--from F --to T] [--preset ID] | The video, .visotalk/<id>/out/final.mp4. Its frames go to the encoder as JPEG; --png makes them PNG. It renders with as many browsers as the machine's cores and memory and the frames allow (30 each, at most 16); --concurrency N chooses. It works in segments of 3000 frames and keeps each until the video is joined, so the same command run again after an interruption skips what was done (segments of another version of the document, or other options, are kept beside and not used). It needs the real narration and stops while an animation names a target no part registers. With captions: 'sidecar' it also writes captions.srt | minutes |
build doc.tsx [--out DIR] [--artifact] | The web player as static files, with the narration and the sounds mixed into one soundtrack as render mixes them; every file but the page is named by its content, so a browser keeps what a new version has not changed. --artifact makes the player for a Claude artifact instead: the narration and the sounds mixed into one MP3, no fonts, player.html and artifact.json | seconds |
play doc.tsx | talk.visotalk [--port 4800] | The live player in your browser, for a document or for a player bundle | |
export doc.tsx [--out talk.visotalk] [--cover pic.jpg] [--player] | The talk as one file: the document, the files it uses, its narration when prepared, captions and credits. --player makes the finished talk instead, which plays and has no document in it (it needs the narration) | seconds |
import talk.visotalk [dir] [--remix] | Unpacks a talk into a new directory. It is checked like any document and nothing in it runs. --remix starts a talk of its own. A voice module (voice="./x.mjs:…") is code that runs with your keys, so import refuses it unless you have read it and pass --allow-voice-module | seconds |
build, play, qa, render and sheet run prepare first whenever KOKORO_DIR (or --tts-models DIR) is set. Clips are cached, so
it is quick when no line changed. Without a model they reuse the existing voice.json and say so.
Narration
The narration is spoken by a local Kokoro model, and word times come from a local aligner. A document can name another voice:
<Doc voice="minimax:English_captivating_female1" speed={1}> speaks it with MiniMax (international endpoint by default; a China account sets MINIMAX_BASE_URL=https://api.minimaxi.com; put MINIMAX_API_KEY in the environment of the one command
that needs it, never in a file), whose own word times replace the aligner's and so also work in other languages. ElevenLabs (voice="elevenlabs:<voice id>", ELEVENLABS_API_KEY),
Volcengine (voice="volcengine:<voice_type>", VOLCENGINE_APPID and VOLCENGINE_ACCESS_TOKEN) and OpenAI (voice="openai:alloy", OPENAI_API_KEY) are built in the same way; OpenAI
returns no word times, so the English-only aligner places the words. Any other service is a module whose
default export is (request) => {audio, ext, words?}: voice="./my-voice.mjs:name". A clip is cached by provider, voice, speed, language and text, so
it is billed once.
Files and environment
Work files go to .visotalk/<id>/ beside the document, where <id> is the document's id; changing it prepares the narration again. VISOTALK_HOME moves
~/.visotalk (keep the path short: narration fails under a path over about 90 characters), and VISOTALK_CHROME, KOKORO_DIR, VISOTALK_PYTHON
and TORCH_HOME override what doctor installed.