Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(narration): warn when narration_timing.json is missing

hugohe32132c50dd23f
diff --git a/skills/ppt-master/scripts/narration_sync.py b/skills/ppt-master/scripts/narration_sync.py
index 91fd13dc..db3ad751 100644
--- a/skills/ppt-master/scripts/narration_sync.py
+++ b/skills/ppt-master/scripts/narration_sync.py
@@ -821,6 +821,7 @@ def rebuild_animations(
ignored_cue_count = 0
svg_fallback_slide_count = 0
drift_warnings: list[str] = []
+ positional_slides: list[tuple[str, int, int]] = []
audio_paths: list[Path] = []
for slide_name in slide_names:
@@ -857,6 +858,8 @@ def rebuild_animations(
)
if used_svg:
svg_fallback_slide_count += 1
+ if timing_plan is None and states:
+ positional_slides.append((slide_name, len(states), len(cues)))
state_ids = {state.group_id for state in states}
cue_by_group: dict[str, int | None] = {}
@@ -959,6 +962,27 @@ def rebuild_animations(
for warning in drift_warnings:
print(f"Warning: {warning}", file=sys.stderr)
+ if positional_slides:
+ print(
+ "Warning: no narration_timing.json found — object reveals were mapped "
+ "positionally (group N -> subtitle cue N). This mistimes any page whose "
+ "narration is longer than its object count: later objects reveal early, "
+ "while the narrator is still on an earlier point. Author "
+ f"{plan_path} mapping each SVG group to the subtitle cue that speaks "
+ "about it (omit a group's cue to keep its canonical delay), then re-run.",
+ file=sys.stderr,
+ )
+ risky = [
+ (name, group_count, cue_count)
+ for name, group_count, cue_count in positional_slides
+ if group_count > 1 and cue_count > group_count + 1
+ ]
+ for name, group_count, cue_count in risky:
+ print(
+ f"Warning: {name}: {group_count} object(s) but {cue_count} "
+ "subtitle cue(s) — later objects likely reveal too early",
+ file=sys.stderr,
+ )
return AnimationBuildResult(
slide_count=len(slide_names),
group_count=anchored_count + fallback_count,
diff --git a/skills/ppt-master/workflows/stages/generate-audio.md b/skills/ppt-master/workflows/stages/generate-audio.md
index 92731756..02dab3d0 100644
--- a/skills/ppt-master/workflows/stages/generate-audio.md
+++ b/skills/ppt-master/workflows/stages/generate-audio.md
@@ -180,6 +180,8 @@ The edge command writes each MP3 and its internal page SRT from the same `edge-t
**Mandatory — semantic animation context**: Before writing or refreshing `<project_path>/narration_timing.json`, determine whether the active context already contains the current top-level SVG group IDs and visible group-content semantics for every affected page. Reuse that context without rereading SVG when it is complete and still matches the current `svg_output/`. If any page is missing, stale, or represented only by group IDs/order without content meaning, read only that page's SVG as a read-only source and extract the missing group semantics. Always combine those semantics with the page SRT topics/timestamps and `animations.json`; group order alone is not a semantic narration mapping.
+> Authoring `narration_timing.json` is not optional polish. When it is absent, `narration_sync.py animations` still runs but maps groups **positionally** (group N → subtitle cue N) and prints a warning listing at-risk slides (those with more cues than objects, where later objects reveal while the narrator is still on an earlier point). Treat that warning as a required-repair signal: author the semantic plan and re-derive.
+
**Narration animation ownership**: `animations.json` must already exist and remains read-only. The audio stage deep-copies it to `narration_animations.json`, preserves transitions, effects, durations, order, and explicit `effect: none`, then changes only the derived trigger/delay values needed for click-free narration playback. The authored `narration_timing.json` maps each animated content group to the SRT cue that speaks about that content. The command may still read an affected SVG page to resolve structural group order when a sparse sidecar cannot identify every effective group; this structural fallback does not replace the semantic-context step and never edits SVG, notes, or `animations.json`. Unmatched groups keep their canonical relative delay.
**Title timing handoff**: preserve the title reveal decision already made by the custom-animation pass. Assign a title group to an SRT cue only when the user's request or the active motion plan explicitly chose `narration-cued`; otherwise leave its `cue` omitted in `narration_timing.json` so it keeps the canonical relative delay from `animations.json`. Do not infer `narration-cued` merely because speaker notes mention the title.