Inputs
You write four files, in this order:script.md, decktalk.toml, cues.json, and the page. All of
them live in the project directory. Your first deck writes each one.
script.md
## N. Titlestarts sectionN.## N. Title — 0:40 to 1:10adds a time budget.---,# Title, or## Titlewith no number ends the section.- A page section needs a
## N.heading. A clip section does not. [any text]and[beat]make a beat. The voice reads a dash there.[pause N]sends<break time="Ns" />. No other direction sends a break tag.- A written
<break time="1s" />passes through as written. [CAPS_1]is a placeholder. Its pattern is[A-Z][A-Z0-9_]*.narraterefuses a placeholder without--allow-placeholders.narrateremoves Markdown formatting before it sends the text.- DeckTalk adds
lead_break_seconds(0.7) of silence before the first spoken section. - DeckTalk pads each section to at least
min_tail_secondsafter its last word. - The default
min_tail_secondsis 0.7. The scaffold sets 1.3. - The
estcolumn assumes 140 words per minute. - A silent build assumes 150 words per minute plus 0.7 s per beat.
decktalk.toml
[project]holdsnameand the optionalscript,cues, andbuildpaths.[voice]holds voice settings. The voice id and key live in.env.- Each
[[section]]has anumberand an optionaltitle. - A page section adds
pageand an optionalscene.scenedefaults tonumber. - A clip section adds
clip, and the optionalslate_seconds,optional, andwords. wordsnames a words file of the speech inside the clip, and the captions add it.- Consecutive sections with the same
titleshare one chapter. - A clip section with
optional = trueplays its slate under--stricttoo. - A clip section can sit before, between, or after page sections.
- A page section can set
lead_seconds,tail_seconds, andhold_secondsto add silence. A hold pauses the narration. [transition],[mix],[soundscape], and the tuning tables are optional.- An unknown top-level table fails the load.
- DeckTalk warns about an unknown key inside a table, then ignores the key.
cues.json
This shape shows the file. It is not a sample.
- Each section key is a section number as a string. It must exist in
decktalk.toml. stepworks as another name forcue.$startis 0.0 s.$endis the end of the section’s last spoken word.- Matching splits the phrase and the spoken words on whitespace only.
- A hyphenated word is one token.
- Each token keeps only A to Z, a to z, 0 to 9, and the straight apostrophe.
- Matching ignores case unless
case_sensitiveis true. - The cue time is the matched word’s start plus the offset key.
occurrencepicks a later match. The default is the first.- A cue id must not contain a comma, because a comma breaks
?beats=. DeckTalk does not check this. - An
@inside an id still works. By convention, ids have no@. beatsignores a top-level key other thansections, such as_comment.
Pages
- A page is any HTML file that a
[[section]]names. - The scaffold has
deck/index.htmlanddeck/lesson.html. - Load
decktalk-runtime.jsbefore anyDeckTalk.scenecall. DeckTalk.scene(N, {name, camera?, steps})defines sceneN.- Each step is
{id, hold?, cues?, render, enter?, on?}. enter, eachon[id], andDeckTalk.on(id, fn)receive(slide, {id, at, frozen, step}).- An element appears on its cue with
data-cue="id", or at a time withdata-at="s". data-sync,data-count, anddata-typealso needdata-cueordata-at.- Inside
renderbackticks, write every backslash twice. - The runtime creates the stage element
#dt-stageat 1920 by 1080. - A step owns a cue with its own id, a
cuesentry, or the longest id prefix. decktalk runtimecopies the packaged runtime into a project.
.env
- A voiced build needs
ELEVENLABS_API_KEYandELEVENLABS_VOICE_ID. - An exported variable wins over
.env. - A value that starts with
<counts as unset. - A silent build needs neither key.
One number for each section
- The number
Nis the same in the script heading,[[section]], and thecues.jsonkey. - A section can play a scene with another number. In the scaffold, section 8 plays scene 7.
beatsexits 1 on a cue id that its page never quotes.buildstops on such an id unless you pass--allow-unknown.
A minimal page
This page is the smallest page that plays one scene. For KaTeX, copy the cachedkatex directory
that decktalk doctor prints into deck/katex/, and keep the two KaTeX tags before the runtime.
deck/index.html
.dt-slide with position: absolute; inset: 0. Set your own
background on html, body and #dt-stage.
Commands
- A project command takes
-p DIR. The default isDECKTALK_PROJECT, then the current directory. -vand-qgo before or after the command name.-pgoes before the command name, or after it on every command exceptinit,setup, anddoctor.- A repeatable option takes one value each time. Write
--only 3 --only 6. --strictonassembleandbuildfails on a missing recording or a missing clip.- A clip section with
optional = truestill plays its slate under--strict.
Every option: CLI.
Gate a script on the video
buildchecks section starts, cuts, and cut continuity. It measures no cue.buildexits 0 onTRUNCATED,STALLED, andNO COVER.- To gate on the whole video, run
decktalk build --silent && decktalk check && decktalk verify. - The offset column must be between -80 ms and +80 ms.
- After a silent build, the
a/vcolumn must be between -120 ms and +120 ms. OFF CUEprints no distance. Compare the columns with those limits.- A
-in thea/vcolumn means no click was found. The JSON reason isNO_CLICK, and it does not fail. - Every cut must be at most -40 dBFS in its last 0.15 s. Clip sections have no cut row.
- A silent build skips the loudness pass.
A
skipped row never fails. A named cue that is not in beats.json is UNRESOLVED, which fails.
Measurement details: verify.
To test a new project with no key, run these commands in order.
- For a project with no runtime copy, run
decktalk runtime. - Run
decktalk build --silent. - Run
decktalk verify. - Run
decktalk shots.
decktalk narrate --silent and then
decktalk beats.
Stages and artifacts
build runs narrate, beats, record, measure, check, assemble, and verify, in that
order.
After a clip between page sections, final-video times are later than narration times by the clip
lengths before them. Time bases gives each clock.
Build artifacts gives every field.
Settings
Settings come from five layers. Each layer overrides the layer before it.- DeckTalk’s defaults.
- The per-machine file at
DECKTALK_CONFIG. It can hold tuning tables only. - Tables of the same name in
decktalk.toml. DECKTALK_<TABLE>_<FIELD>environment variables.- The options
--preset,--crf,--settle, and--model.
[video][narration][record][align][audio][verify][elevenlabs]
DECKTALK_CACHE_DIR moves the KaTeX cache. DECKTALK_FFMPEG and DECKTALK_FFPROBE point at your
own binaries. Set both. CLI gives the default paths, and
Configuration lists every field.
Exit codes and errors
An error prints
error: <message> on stderr and exits 1, even with --no-fail. Logs go to stderr
through the decktalk logger. DeckTalk never prints a key.
Python
This example builds the scaffold silently and prints the final path.Related
- Look up an option: CLI
- Fix a message: Troubleshooting
- Look up a term: Glossary