@slidevideo/cli 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/IMPRESSUM.md +13 -0
- package/LICENSE-TERMS.md +58 -0
- package/README.md +25 -0
- package/addons/slidevideo/geometry.ts +127 -0
- package/addons/slidevideo/global-top.vue +232 -0
- package/addons/slidevideo/package.json +1 -0
- package/addons/slidevideo/playback-entries.ts +14 -0
- package/addons/slidevideo/preview.ts +157 -0
- package/dist/adapters/browser-runtime.d.ts +37 -0
- package/dist/adapters/browser-runtime.js +1 -0
- package/dist/adapters/edge.d.ts +7 -0
- package/dist/adapters/edge.js +46 -0
- package/dist/adapters/elevenlabs.d.ts +7 -0
- package/dist/adapters/elevenlabs.js +58 -0
- package/dist/adapters/powerpoint-preview.d.ts +2 -0
- package/dist/adapters/powerpoint-preview.js +18 -0
- package/dist/adapters/powerpoint.d.ts +21 -0
- package/dist/adapters/powerpoint.js +434 -0
- package/dist/adapters/registry.d.ts +4 -0
- package/dist/adapters/registry.js +13 -0
- package/dist/adapters/slidev-inputs.d.ts +1 -0
- package/dist/adapters/slidev-inputs.js +86 -0
- package/dist/adapters/slidev-inspection.d.ts +3 -0
- package/dist/adapters/slidev-inspection.js +79 -0
- package/dist/adapters/slidev-server.d.ts +1 -0
- package/dist/adapters/slidev-server.js +48 -0
- package/dist/adapters/slidev.d.ts +30 -0
- package/dist/adapters/slidev.js +251 -0
- package/dist/annotation-paint.d.ts +19 -0
- package/dist/annotation-paint.js +13 -0
- package/dist/annotations.d.ts +27 -0
- package/dist/annotations.js +115 -0
- package/dist/assembly.d.ts +48 -0
- package/dist/assembly.js +138 -0
- package/dist/calibration.d.ts +24 -0
- package/dist/calibration.js +346 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +180 -0
- package/dist/compositor.d.ts +18 -0
- package/dist/compositor.js +155 -0
- package/dist/contracts.d.ts +358 -0
- package/dist/contracts.js +1 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.js +15 -0
- package/dist/executables.d.ts +23 -0
- package/dist/executables.js +165 -0
- package/dist/installation.d.ts +6 -0
- package/dist/installation.js +32 -0
- package/dist/license-key.d.ts +12 -0
- package/dist/license-key.js +55 -0
- package/dist/license-status.d.ts +16 -0
- package/dist/license-status.js +12 -0
- package/dist/media.d.ts +12 -0
- package/dist/media.js +57 -0
- package/dist/overlay-assets.d.ts +2 -0
- package/dist/overlay-assets.js +58 -0
- package/dist/pipeline.d.ts +50 -0
- package/dist/pipeline.js +257 -0
- package/dist/preview/contracts.d.ts +34 -0
- package/dist/preview/contracts.js +1 -0
- package/dist/preview/player.d.ts +1 -0
- package/dist/preview/player.js +129 -0
- package/dist/preview/server.d.ts +1 -0
- package/dist/preview/server.js +112 -0
- package/dist/preview/view.d.ts +1 -0
- package/dist/preview/view.js +36 -0
- package/dist/revoked-keys.json +1 -0
- package/dist/run.d.ts +12 -0
- package/dist/run.js +109 -0
- package/dist/setup-install.d.ts +7 -0
- package/dist/setup-install.js +98 -0
- package/dist/setup-license.d.ts +2 -0
- package/dist/setup-license.js +63 -0
- package/dist/setup.d.ts +34 -0
- package/dist/setup.js +218 -0
- package/dist/speech.d.ts +6 -0
- package/dist/speech.js +125 -0
- package/dist/storyboard.d.ts +6 -0
- package/dist/storyboard.js +86 -0
- package/dist/timing.d.ts +6 -0
- package/dist/timing.js +162 -0
- package/package.json +134 -0
- package/schemas/annotation-geometry.v1.json +130 -0
- package/schemas/revoked-keys.schema.json +11 -0
- package/schemas/run-manifest.v1.json +96 -0
- package/schemas/schedule.v1.json +108 -0
- package/schemas/schedule.v2.json +496 -0
- package/schemas/speech.v1.json +173 -0
- package/schemas/storyboard.v1.json +461 -0
- package/schemas/storyboard.v2.json +802 -0
- package/schemas/timing-evidence.v1.json +129 -0
- package/skills/slidevideo/SKILL.md +56 -0
- package/skills/slidevideo/references/production.md +76 -0
- package/skills/slidevideo/references/storyboard.md +272 -0
- package/tools/edge-tts/edge-tts.py +19 -0
- package/tools/edge-tts/requirements.lock +34 -0
- package/tools/powerpoint/Native.cs +277 -0
- package/tools/powerpoint/powerpoint.ps1 +714 -0
- package/tools/powerpoint/preview.ps1 +100 -0
- package/tools/powerpoint/requirements.json +11 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://slidevideo.local/schemas/timing-evidence.v1.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"version": {
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"status": {
|
|
10
|
+
"enum": [
|
|
11
|
+
"accepted",
|
|
12
|
+
"failed",
|
|
13
|
+
"not_evaluated"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"target_ms": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"minimum": 0
|
|
19
|
+
},
|
|
20
|
+
"uncertainty_ms": {
|
|
21
|
+
"type": "number",
|
|
22
|
+
"minimum": 0
|
|
23
|
+
},
|
|
24
|
+
"mapping": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"offset_ms": {
|
|
28
|
+
"type": "number"
|
|
29
|
+
},
|
|
30
|
+
"rate": {
|
|
31
|
+
"type": "number"
|
|
32
|
+
},
|
|
33
|
+
"trim_start_ms": {
|
|
34
|
+
"type": "number",
|
|
35
|
+
"minimum": 0
|
|
36
|
+
},
|
|
37
|
+
"trim_end_ms": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"minimum": 0
|
|
40
|
+
},
|
|
41
|
+
"offset_min_ms": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
},
|
|
44
|
+
"offset_max_ms": {
|
|
45
|
+
"type": "number"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"offset_ms",
|
|
50
|
+
"rate",
|
|
51
|
+
"trim_start_ms",
|
|
52
|
+
"trim_end_ms"
|
|
53
|
+
],
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
},
|
|
56
|
+
"checks": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"id": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"expected_ms": {
|
|
65
|
+
"type": "number"
|
|
66
|
+
},
|
|
67
|
+
"observed_ms": {
|
|
68
|
+
"type": "number"
|
|
69
|
+
},
|
|
70
|
+
"error_ms": {
|
|
71
|
+
"type": "number"
|
|
72
|
+
},
|
|
73
|
+
"evidence": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"frame_index": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0
|
|
79
|
+
},
|
|
80
|
+
"capture_ms": {
|
|
81
|
+
"type": "number",
|
|
82
|
+
"minimum": 0
|
|
83
|
+
},
|
|
84
|
+
"uncertainty_ms": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"minimum": 0
|
|
87
|
+
},
|
|
88
|
+
"bracket_start_ms": {
|
|
89
|
+
"type": "number"
|
|
90
|
+
},
|
|
91
|
+
"bracket_end_ms": {
|
|
92
|
+
"type": "number"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"id",
|
|
97
|
+
"expected_ms",
|
|
98
|
+
"observed_ms",
|
|
99
|
+
"error_ms",
|
|
100
|
+
"evidence"
|
|
101
|
+
],
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"coverage": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"gaps": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"version",
|
|
120
|
+
"status",
|
|
121
|
+
"target_ms",
|
|
122
|
+
"uncertainty_ms",
|
|
123
|
+
"mapping",
|
|
124
|
+
"checks",
|
|
125
|
+
"coverage",
|
|
126
|
+
"gaps"
|
|
127
|
+
],
|
|
128
|
+
"additionalProperties": false
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slidevideo
|
|
3
|
+
description: Draft, explain, review and revise slidevideo.yaml storyboards for existing Slidev or PowerPoint presentations, then operate the SlideVideo CLI to produce narrated videos. Use for narration, reveals, phrase cues, marker highlights, image overlays, pauses, media, voice settings and production feedback. Creating or redesigning the input deck is outside this skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Author and produce a SlideVideo
|
|
7
|
+
|
|
8
|
+
Own the storyboard and the workflow from an existing presentation to a narrated MP4. Treat `slidevideo.yaml` as the creator's editable production intent. The CLI generates speech, alignment, schedules, captures and assembly artifacts from that intent.
|
|
9
|
+
|
|
10
|
+
Work in the folder containing the creator's presentation. The installed CLI supplies this skill and its references offline. Use `slidevideo skill --json` for the installed Markdown file's path and contents. Resolve relative links from that file.
|
|
11
|
+
|
|
12
|
+
Run `slidevideo skill storyboard` for the [storyboard reference](references/storyboard.md) when drafting or revising YAML. It covers versions 1 and 2, timing, marker highlights, image overlays, voice options and presentation limits. The bundled [version 1 schema](../../schemas/storyboard.v1.json) and [version 2 schema](../../schemas/storyboard.v2.json) define the fields. Use `slidevideo validate` to check the draft against the actual deck.
|
|
13
|
+
|
|
14
|
+
Run `slidevideo skill production` for the [production workflow](references/production.md) when setting up, recording or diagnosing a video. Start a new storyboard from the [minimal example](references/storyboard.md#minimal-authored-example) and use the actual slide names from the supplied presentation.
|
|
15
|
+
|
|
16
|
+
## Establish the inputs
|
|
17
|
+
|
|
18
|
+
Read the supplied deck, existing storyboard, brief and supporting material. Identify the intended audience, narration language, tone, length and voice from the request. Ask only for missing information that affects a useful draft. Keep reasonable draft assumptions visible for review.
|
|
19
|
+
|
|
20
|
+
Inspect actual slide targets, reveal steps, effect durations and embedded-media names using the existing adapter inspection or an available presentation reader. For Slidev, account for imports and the effective slide order. For PowerPoint, use native slide names or actual SlideID aliases and video Shape.Name values. Do not invent targets or claim unknown animation bounds are verified.
|
|
21
|
+
|
|
22
|
+
Creating, redesigning or repairing the input `.md` or `.pptx` presentation is outside this skill. Preserve the supplied deck. If requested narration or actions need a deck change, explain the specific dependency and let the creator supply an updated deck or request separate deck-authoring work. Do not regenerate a supplied deck with an example authoring script.
|
|
23
|
+
|
|
24
|
+
## Draft the storyboard
|
|
25
|
+
|
|
26
|
+
Create `slidevideo.yaml` when none exists. `.yml` is also accepted when selected explicitly. Produce a concrete YAML draft based on the supplied material. Keep unresolved questions and editorial assumptions in the accompanying review, rather than adding unsupported YAML fields.
|
|
27
|
+
|
|
28
|
+
Write narration supported by the sources and appropriate for spoken delivery. Narration segments can cross slide boundaries. Separate segments when an intentional silence or independent revision makes that useful.
|
|
29
|
+
|
|
30
|
+
Map the narrative to real slide and reveal targets. Choose sequential actions for ordered speech, holds and media. Choose phrase cues when a visual action should occur during speech. Account for native effect duration and complete media playback. Distinguish an estimated target length from the duration that actual synthesized speech will establish.
|
|
31
|
+
|
|
32
|
+
Use stable IDs and paths relative to the storyboard. Include all required root fields, even when their lists are empty. Use Edge TTS for new drafts unless the creator chooses another provider. Preserve an existing, explicitly selected voice when revising that production.
|
|
33
|
+
|
|
34
|
+
## Review and revise with the creator
|
|
35
|
+
|
|
36
|
+
For marker highlights, run `slidevideo inspect --storyboard <file> --json` to discover existing audience-slide selectors or native shape IDs. Inspect the deck and returned visibility/click information before choosing a target. Regions need no element metadata. Never invent an element ID, edit the deck to create a target, infer words inside an image or claim whole-shape bounds establish word geometry.
|
|
37
|
+
|
|
38
|
+
Use version 2 and its `annotations` array for highlights. The [marker example and target fields](references/storyboard.md#version-2-marker-highlights) cover Slidev and PowerPoint. Bind each highlight to an existing narration phrase and scene, with a positive duration inside one settled slide visit and reveal state. Choose normalized regions, Slidev element selectors or native PowerPoint shape IDs as appropriate. Color, opacity, normalized x/y padding, optional `blend` and optional `bottom_border` belong to `appearance`. Other effects and moving targets are unsupported.
|
|
39
|
+
|
|
40
|
+
Add, change or remove only the requested annotation and preserve unrelated annotations, narration, scene actions, media, IDs and settings. A new video after an annotation-only edit needs a new run and can reuse matching speech. Validate the draft through the real CLI. Required phrase alignment and actual target geometry are checked during resolution and capture. Highlights are composited into the final MP4, so ordinary deck playback and the raw recording remain unannotated.
|
|
41
|
+
|
|
42
|
+
When the creator wants to watch the storyboard, run `slidevideo play --storyboard <file>` and give them the local URL. Add `--cache-dir <directory>` for retained timing. The silent browser player shows live highlights and supports Play, Pause and Replay. Restart the command after a YAML edit. Phrase cues require matching alignment. [Preview and recording commands](references/production.md#choose-the-operation)
|
|
43
|
+
|
|
44
|
+
For an authoring or review request, deliver the YAML and a readable outline of the narration, slide changes, reveals, holds, media and voice. Point out assumptions, unsupported requests and choices that affect pacing. A compact table is useful when several scenes or cues need review. Do not generate speech or record a video merely to review a text draft.
|
|
45
|
+
|
|
46
|
+
Incorporate feedback into the authored YAML. Preserve stable IDs, unrelated settings and useful comments. Identify the affected segment or action before editing. For example, halving a pause means changing the relevant `hold.duration_ms`, not changing speech speed or every hold. Clarify only when the intended target is ambiguous.
|
|
47
|
+
|
|
48
|
+
After a narration edit, check any cue phrases that refer to that text. After a slide or reveal edit, check the active slide and click order. Explain the substantive changes and return the revised draft for further feedback when requested.
|
|
49
|
+
|
|
50
|
+
Proceed to production when the creator requests a video or has already authorized that step. Do not add another approval step to an already authorized production. Storyboard review and the creator's review of the delivered MP4 are separate from optional decoded timing verification.
|
|
51
|
+
|
|
52
|
+
## Operate the solution
|
|
53
|
+
|
|
54
|
+
Follow the [production workflow](references/production.md) for installation, command selection, speech reuse, new runs, diagnosis and final delivery. Keep generated timing and runtime evidence out of the authored YAML. Resolve timing from the exact speech and media before capture.
|
|
55
|
+
|
|
56
|
+
For a text revision, check the edited storyboard. When production is requested, normal delivery leaves timing `not_evaluated` for the creator's review. Use `--verify-timing` only when timing proof is requested.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Operate SlideVideo
|
|
2
|
+
|
|
3
|
+
## Set up the host
|
|
4
|
+
|
|
5
|
+
Use the installed `slidevideo` executable in the presentation folder. Run `slidevideo setup` to select your presentation format and speech provider, or `slidevideo setup --help` for setup options. Windows PowerShell can use `slidevideo.cmd` when execution policy blocks the generated `.ps1` launcher.
|
|
6
|
+
|
|
7
|
+
Slidev needs its browser runtime. Native PowerPoint needs installed desktop PowerPoint on Windows with an unlocked interactive desktop. Both use FFmpeg and ffprobe. Edge TTS uses the pinned local Python adapter. Provider credentials belong in environment variables or a local `.env`, never in storyboards or chat output.
|
|
8
|
+
|
|
9
|
+
Keep the existing presentation as input. The production CLI does not require an AI agent to author intermediate files or an authoring script to recreate the deck. Narration text is authored in the storyboard, and the selected TTS service synthesizes its audio.
|
|
10
|
+
|
|
11
|
+
## Choose the operation
|
|
12
|
+
|
|
13
|
+
For an authoring or explanation request, return the draft, revision or answer without starting production. When validation is requested, use `validate`; it checks syntax, references and capabilities without requesting speech or recording. Pending phrase alignment is checked later, during resolution.
|
|
14
|
+
|
|
15
|
+
For a visual pacing review, use `play --storyboard <file>` and open the printed URL. Add `--cache-dir <directory>` to use retained speech timing. The player estimates uncached narration duration and requires matching alignment for phrase cues. All audio stays silent. Keep the CLI running while the creator uses the browser controls. Stop and relaunch it after storyboard edits.
|
|
16
|
+
|
|
17
|
+
For a requested finished video, use `build`. It validates inputs, generates or reuses matching speech, resolves timing, captures the presentation and assembles the MP4. Use a new run directory and pass `--cache-dir` when the creator has a speech cache.
|
|
18
|
+
|
|
19
|
+
Use staged commands when an intermediate result is useful to the creator. `tts` prepares audio and alignment, `resolve` calculates the schedule, `record` captures from resolved inputs, and `assemble` produces the final MP4. A requested narration review can occur after `tts` and before capture. `record` does not generate speech implicitly.
|
|
20
|
+
|
|
21
|
+
Run `slidevideo --help` for command options. To record the presentation in the current folder, run the following command.
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
slidevideo build --storyboard slidevideo.yaml --run runs/video-001 --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
That run directory must be new or empty. A nonzero exit, failed status or missing requested completed stages is failure. A completed normal build reports `status: completed` and `timing_status: not_evaluated`, with a video artifact path.
|
|
28
|
+
|
|
29
|
+
## Produce marker highlights
|
|
30
|
+
|
|
31
|
+
Use version 2 and follow the [marker field reference](storyboard.md#version-2-marker-highlights). Discover actual targets with `slidevideo inspect --storyboard <file> --json`. Existing Slidev selectors and native shape IDs belong to their adapters. Regions use normalized slide coordinates. Do not edit the source deck to introduce targets.
|
|
32
|
+
|
|
33
|
+
Use the same `validate` and `build` commands for a storyboard with markers. The assembler draws highlights on the captured frames. A changed annotation needs a new run and can reuse matching speech.
|
|
34
|
+
|
|
35
|
+
Inspect geometry observations, `assembly/annotations-applied.json` and `assembly/report.json` separately from base-capture timing. Normal final-composite evidence remains `not_evaluated`. Requested timing proof checks decoded final frames and retains `assembly/annotations-evidence.json`. Unobservable boundaries fail explicitly. [Marker limits and target types](storyboard.md#version-2-marker-highlights)
|
|
36
|
+
|
|
37
|
+
## Reuse speech and preserve revisions
|
|
38
|
+
|
|
39
|
+
Speech reuse depends on the segment text, provider, voice, options and adapter version. Keep generated speech in a cache to reuse matching audio and alignment on later recordings, including paid ElevenLabs narration.
|
|
40
|
+
|
|
41
|
+
After feedback changes the storyboard, choose a new run and reuse compatible speech through the cache. `build --resume` is for unchanged inputs and intact completed stages. It cannot apply an edited storyboard to an old run. Never overwrite failed recording evidence. Follow an explicit user cleanup request separately from production.
|
|
42
|
+
|
|
43
|
+
Keep authored intent, actual alignment, resolved timing, observed execution and decoded-frame evidence separate. Do not estimate word timings from text length, edit generated alignment or stretch narration to hide drift. Capture follows timing resolved from the exact speech and media.
|
|
44
|
+
|
|
45
|
+
Retain raw captures, speech, alignment, schedules, failures and final output in the run so later review and diagnosis use the original evidence.
|
|
46
|
+
|
|
47
|
+
## Select verification proportionally
|
|
48
|
+
|
|
49
|
+
Normal production skips reference-image rehearsal, closing calibration markers and per-cue timing proof. It still performs necessary input, playback and output checks and uses opening markers to locate capture origin. There is no current CLI flag that disables all mandatory checks.
|
|
50
|
+
|
|
51
|
+
Add `--verify-timing` to `build` or `record` only when timing proof is requested. The shared analyzer applies a 100 ms acceptance bound to its checked transitions and media samples, subject to its recorded uncertainty and coverage. A failed proof remains failed. It is not permission to retry silently in normal mode.
|
|
52
|
+
|
|
53
|
+
Staged `assemble` and resumed builds inherit the run's timing mode. Changing that mode requires a new run. A successful normal build does not prove synchronized playback or continuous motion at every point.
|
|
54
|
+
|
|
55
|
+
## Diagnose the failed stage
|
|
56
|
+
|
|
57
|
+
| Diagnostic | Relevant response |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `SCHEMA`, `DUPLICATE_ID`, reference errors | Correct the authored fields or references against the storyboard reference. |
|
|
60
|
+
| `CUE_ALIGNMENT_REQUIRED`, `CUE_PHRASE_MISSING`, `CUE_AMBIGUOUS`, `CUE_BOUNDARY` | Inspect the exact paired transcript and alignment. Revise the intended phrase or action with the creator. Do not invent timings. |
|
|
61
|
+
| `REVEAL_TARGET`, `REVEAL_ORDER`, `ACTION_CONFLICT`, `MEDIA_NAVIGATION`, `SCENE_DURATION` | Check the merged sequence and cues, active slide, click order and reserved durations. |
|
|
62
|
+
| `RUN_MISMATCH`, `SCHEDULE_MISMATCH` | Start a new run for the revised inputs. |
|
|
63
|
+
| `RECORD_RETRY_NEW_RUN` | Preserve the failed capture and use a new run for another attempt. |
|
|
64
|
+
| `MEDIA_SOURCE_MISMATCH` | Confirm the declaration matches the exact media bytes rendered by the deck. |
|
|
65
|
+
| Browser preparation or capture failure | Read the run's `recording/slidev.log` and check the configured native Chromium executable. |
|
|
66
|
+
| `POWERPOINT_PLATFORM`, `POWERPOINT_DEPENDENCY`, `POWERPOINT_CAPABILITY` | Check the Windows/Office host and documented native capabilities. Report required deck changes as separate work. |
|
|
67
|
+
| Native playback, capture or cleanup failure | Read the recording directory's failure, event, geometry, FFmpeg and cleanup diagnostics. Preserve foreign PowerPoint presentations. |
|
|
68
|
+
| `TIMING_ACCEPTANCE` | Read the retained timing report, decoded-frame locators and gaps before deciding whether a targeted correction or another capture is justified. |
|
|
69
|
+
|
|
70
|
+
Report the failed stage and the path to its diagnostics in the run directory.
|
|
71
|
+
|
|
72
|
+
## Deliver and incorporate feedback
|
|
73
|
+
|
|
74
|
+
Inspect the final CLI result and deliver the existing MP4 path. Report what completed, the selected voice and whether timing was evaluated. Normal production leaves viewing, listening and editorial review to the creator. Agent viewing or listening is not a delivery gate.
|
|
75
|
+
|
|
76
|
+
Use creator feedback to distinguish an authored-intent change from a runtime defect. A shorter hold belongs in the YAML. A frozen picture needs investigation of retained source, capture and output evidence. A successful CLI result alone does not dismiss an observed defect. Apply only the requested change or a supported repair, then use the minimum relevant production work already authorized.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# Storyboard reference
|
|
2
|
+
|
|
3
|
+
## Purpose and format
|
|
4
|
+
|
|
5
|
+
The storyboard is the authored plan for narration, presentation actions, media audio and pacing. The CLI derives speech audio, transcript alignment, resolved timing, observed events and recordings from it. Those generated artifacts are separate from the YAML.
|
|
6
|
+
|
|
7
|
+
The conventional filename is `slidevideo.yaml`. A `.yml` filename also works through `--storyboard`. Relative `deck`, `media[].src`, and `overlays[].src` paths resolve from the storyboard directory, not the shell's working directory.
|
|
8
|
+
|
|
9
|
+
The bundled [JSON schema](../../../schemas/storyboard.v1.json) defines field syntax. Run `slidevideo validate --storyboard slidevideo.yaml` to check references and presentation capabilities. Timing resolution checks the schedule against actual speech and media. All defined objects reject extra fields except the provider-specific `voice.options` object. Its adapter rejects unknown options.
|
|
10
|
+
|
|
11
|
+
IDs and slide targets use `^[a-zA-Z][a-zA-Z0-9_-]*$`. They start with an ASCII letter, followed by letters, digits, underscores or hyphens. IDs are globally unique across media, narration, scenes, scene actions and cues. References reuse those IDs. Derived schedule IDs, such as `opening:slide`, are not authored IDs.
|
|
12
|
+
|
|
13
|
+
## Root fields
|
|
14
|
+
|
|
15
|
+
| Field | Required | Meaning |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `version` | Yes | `1` for the unchanged original contract; `2` adds required `annotations`. |
|
|
18
|
+
| `deck` | Yes | Nonempty path to an existing Slidev `.md` or native PowerPoint `.pptx` input. |
|
|
19
|
+
| `voice` | No | Default voice for narration. Every spoken segment needs either this default or its own voice. Silent productions can omit it. |
|
|
20
|
+
| `output` | Yes | Requested video dimensions and frame rate. |
|
|
21
|
+
| `media` | Yes | Array of declared source media. `[]` is valid when none is used. |
|
|
22
|
+
| `narration` | Yes | Array of text segments. `[]` supports a silent or source-audio-only production. |
|
|
23
|
+
| `scenes` | Yes | Ordered scenes and their sequential actions. Total resolved production duration must be positive. |
|
|
24
|
+
| `cues` | Yes | Array of phrase-driven visual actions. `[]` is valid. |
|
|
25
|
+
| `annotations` | Version 2 only | Array of phrase-triggered rectangular marker highlights; `[]` preserves ordinary production. Version 1 rejects this field. |
|
|
26
|
+
| `overlays` | No, version 2 only | Frame-fixed image layers for the exported video. |
|
|
27
|
+
|
|
28
|
+
Required fields have no implicit root defaults. Examples commonly choose 1920 by 1080 at 30 fps, but those values must be authored.
|
|
29
|
+
|
|
30
|
+
## Output fields
|
|
31
|
+
|
|
32
|
+
| Field | Required | Accepted values |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `output.width` | Yes | Even integer from 640 to 3840. |
|
|
35
|
+
| `output.height` | Yes | Even integer from 360 to 2160. |
|
|
36
|
+
| `output.fps` | Yes | `15`, `24`, `30` or `60`. |
|
|
37
|
+
|
|
38
|
+
PowerPoint requires the output aspect ratio to match the deck. Its native slideshow window is capped at 1600 physical pixels wide. The recorder scales the captured slide to the requested output dimensions.
|
|
39
|
+
|
|
40
|
+
## Voice fields and provider options
|
|
41
|
+
|
|
42
|
+
A voice object has required nonempty strings `provider` and `voice`, plus optional `options`. A narration segment's `voice` replaces the root voice object for that segment. Options are not merged between the two objects.
|
|
43
|
+
|
|
44
|
+
| Provider | `voice` | Supported options |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `edge-tts` | Edge voice name, such as `en-US-AriaNeural`. | `rate`, `volume` and `pitch`. |
|
|
47
|
+
| `elevenlabs` | ElevenLabs voice ID available to the account. | `model_id`, `stability`, `similarity_boost` and `speed`. |
|
|
48
|
+
|
|
49
|
+
Edge option values are strings. `rate` and `volume` require a sign, integer and `%`, such as `+10%` or `-5%`. `pitch` requires a sign, integer and `Hz`, such as `+0Hz`. These affect synthesized narration. `play.volume` separately controls source-media audio.
|
|
50
|
+
|
|
51
|
+
ElevenLabs option values are:
|
|
52
|
+
|
|
53
|
+
| Option | Accepted value | Omission behavior |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| `model_id` | String model identifier. | The adapter selects `eleven_multilingual_v2`. |
|
|
56
|
+
| `stability` | Number from 0 to 1. | Provider default. |
|
|
57
|
+
| `similarity_boost` | Number from 0 to 1. | Provider default. |
|
|
58
|
+
| `speed` | Number from 0.7 to 1.2. | Provider default. |
|
|
59
|
+
|
|
60
|
+
Credentials come from the environment or local `.env`, never from YAML. ElevenLabs accepts `ELEVENLABS_API_KEY` or the legacy `ELEVENLABS_KEY`. Edge uses the pinned local Python adapter. Run `slidevideo setup` to configure your speech provider.
|
|
61
|
+
|
|
62
|
+
## Media declarations
|
|
63
|
+
|
|
64
|
+
Each `media` item has required `id` and nonempty `src`. The ID identifies the controlled element in the presentation. The source file supplies measured duration and, when selected, audio for assembly.
|
|
65
|
+
|
|
66
|
+
For Slidev, the ID matches the actual media element's `id`. For PowerPoint, it matches the embedded video's `Shape.Name`. The declared source must match the actual presented media bytes. A visually similar re-encode is not the same source.
|
|
67
|
+
|
|
68
|
+
## Narration segments
|
|
69
|
+
|
|
70
|
+
Each `narration` item has required `id` and nonempty `text`, plus an optional complete `voice` override. Every segment must be referenced by exactly one sequential `speak` action. Unscheduled segments and multiple scheduling of one segment fail validation.
|
|
71
|
+
|
|
72
|
+
The spoken duration comes from the generated audio. The YAML has no narration-duration field. Cue phrases match the paired alignment transcript, whose form can be original or provider-normalized text.
|
|
73
|
+
|
|
74
|
+
## Scenes
|
|
75
|
+
|
|
76
|
+
| Field | Required | Meaning |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| `id` | Yes | Stable scene ID. |
|
|
79
|
+
| `slide` | Yes | Actual starting slide target. Each scene selects it at scene start and resets its reveal count. |
|
|
80
|
+
| `actions` | Yes | Ordered array of sequential actions. |
|
|
81
|
+
| `duration_ms` | No | Nonnegative fixed total scene duration, including its actions. Remaining time becomes a final hold. Actions that exceed it fail resolution. |
|
|
82
|
+
|
|
83
|
+
Scenes execute in array order. A scene can navigate across slides, and several scenes can start on the same slide. A scene is a narrative unit rather than a required one-to-one mapping to a slide.
|
|
84
|
+
|
|
85
|
+
## Sequential actions
|
|
86
|
+
|
|
87
|
+
Every scene action has required `id` and `type`. The other fields depend on the type. Durations are nonnegative numbers in milliseconds, not seconds. Each action starts after the preceding sequential action finishes.
|
|
88
|
+
|
|
89
|
+
| Type | Other required fields | Optional fields | Duration and behavior |
|
|
90
|
+
| --- | --- | --- | --- |
|
|
91
|
+
| `speak` | `segment` | None | Plays the referenced narration segment for its measured audio duration. |
|
|
92
|
+
| `slide` | `target`, `duration_ms` | None | Selects the target slide and resets reveals. Reserves the declared settling interval. The deck supplies the visual transition. |
|
|
93
|
+
| `reveal` | `click`, `duration_ms` | None | Advances to an integer click step of at least 1 on the active slide. Reserves the complete effect duration. |
|
|
94
|
+
| `hold` | `duration_ms` | None | Adds waiting time without issuing a visual or audio action. Independent cues and audio can continue. |
|
|
95
|
+
| `play` | `media`, `audio`, `volume` | `trim_start_ms`, `trim_end_ms`, `rate` | Plays declared media. Duration is the selected source interval divided by playback rate. |
|
|
96
|
+
|
|
97
|
+
`segment` references a narration ID. `target` is a slide target. `media` references a declared media ID. A reveal's `click` is the target step, not a count of extra clicks. Clicks advance until a slide selection resets them.
|
|
98
|
+
|
|
99
|
+
### Play options
|
|
100
|
+
|
|
101
|
+
| Field | Accepted values and defaults |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| `audio` | Required `source` or `muted`. `source` requires an audio stream in the declared media. |
|
|
104
|
+
| `volume` | Required number from 0 to 4. `1` is unchanged gain, `0` is silent. It applies to source audio, not narration. |
|
|
105
|
+
| `trim_start_ms` | Optional nonnegative source position. Default `0`. |
|
|
106
|
+
| `trim_end_ms` | Optional nonnegative source position. Default source duration. Must be after the start and no later than source duration. |
|
|
107
|
+
| `rate` | Optional number from 0.5 to 2. Default `1`. Picture and source audio use the same rate. |
|
|
108
|
+
|
|
109
|
+
The duration formula is `(trim_end_ms - trim_start_ms) / rate`, with omitted trims replaced by their defaults. Schema acceptance does not imply adapter support. Native PowerPoint currently accepts only start `0`, omitted end and rate `1`.
|
|
110
|
+
|
|
111
|
+
Source-audio volume is an explicit fixed gain. The storyboard has no automatic ducking option.
|
|
112
|
+
|
|
113
|
+
## Phrase cues
|
|
114
|
+
|
|
115
|
+
Each cue has required `id`, `at` and `action`. Cues run independently of the sequential scene cursor. A cue can change slides or reveal content while one narration segment continues.
|
|
116
|
+
|
|
117
|
+
| `at` field | Required | Meaning |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| `segment` | Yes | Narration segment containing the phrase. |
|
|
120
|
+
| `phrase` | Yes | Nonempty exact text to find in that segment's alignment transcript. |
|
|
121
|
+
| `occurrence` | No | One-based integer of at least 1. Required to disambiguate repeated matches. |
|
|
122
|
+
| `boundary` | Yes | `start` uses the first aligned unit's start. `end` uses the last aligned unit's end. |
|
|
123
|
+
| `offset_ms` | Yes | Number added to that boundary. Negative values lead the phrase, positive values delay the action. |
|
|
124
|
+
|
|
125
|
+
The cue's `action` is `slide`, `reveal` or `play`, with the same fields as a sequential visual action except it has no nested `id`. The cue's own ID identifies the action. `speak` and `hold` are not cue actions.
|
|
126
|
+
|
|
127
|
+
The resolved start is the narration segment's scheduled start plus its aligned phrase boundary plus `offset_ms`. The action starts at that time. For slide and reveal actions, `duration_ms` is a settling allowance, not an instruction to complete at the phrase boundary.
|
|
128
|
+
|
|
129
|
+
Phrase matching requires exact text and aligned unit boundaries. For word alignment, a phrase must start and end at available word boundaries. Missing alignment, absent phrases, ambiguous occurrences or unavailable boundaries fail resolution. Guessed word timings are not a fallback.
|
|
130
|
+
|
|
131
|
+
A cue never lengthens the production. Its entire action must fit between time zero and the sequential production's end. An explicit sequential hold can provide room when intended.
|
|
132
|
+
|
|
133
|
+
## Timing and conflict rules
|
|
134
|
+
|
|
135
|
+
Speech and media lengths are measured before capture. A phrase cue does not stop or delay its narration. Sequential `speak` actions wait for the complete segment, so an action after speech occurs after that speech unless authored as an independent cue.
|
|
136
|
+
|
|
137
|
+
Competing slide/reveal actions cannot overlap. Repeated playback of the same media cannot overlap. A later slide selection cannot interrupt active media. Reveals must advance on the active slide. Native PowerPoint adds stricter rules for consecutive clicks and competing native operations, including playback of different video shapes.
|
|
138
|
+
|
|
139
|
+
The storyboard reserves intended durations. The resolved schedule establishes exact planned times. Execution events record what actually occurred, and optional decoded-frame checks evaluate only their stated coverage. A successful normal build is not timing acceptance.
|
|
140
|
+
|
|
141
|
+
## Presentation-specific authoring
|
|
142
|
+
|
|
143
|
+
| Concern | Slidev `.md` | Native PowerPoint `.pptx` |
|
|
144
|
+
| --- | --- | --- |
|
|
145
|
+
| Slide targets | Authored frontmatter `name`, otherwise `slide-<one-based effective index>`. Imports and filtering affect that index. | Unique native `Slide.Name`, or unambiguous `slide-<SlideID>`. SlideID is not the slide position. Names must also fit the YAML target syntax. |
|
|
146
|
+
| Reveals | Native click-driven content, such as `v-click`. Steps advance and must fit known or runtime-checked bounds. | Consecutive finite entrance Appear/Fade click groups. The declared duration must cover the complete native group. |
|
|
147
|
+
| Slide changes | Authored deck transition, with a matching settling allowance. | Cuts. Native slide transitions, timed advancement, hidden slides and interactive sequences are unsupported. |
|
|
148
|
+
| Video | Managed media element with a matching declared source. Trims and rates follow the shared action contract. | Full embedded video at rate 1, with exact source-byte matching. No native trim, autoplay, loop, rewind or fullscreen transform. |
|
|
149
|
+
| Runtime | Playwright-controlled Chromium and the playback addon. | Windows desktop PowerPoint and FFmpeg native window capture on an unlocked interactive desktop. |
|
|
150
|
+
|
|
151
|
+
Linked or online media and unsupported dynamic PowerPoint objects fail capability validation. Inspect the deck's existing animations and media before scheduling them in the storyboard.
|
|
152
|
+
|
|
153
|
+
## Minimal authored example
|
|
154
|
+
|
|
155
|
+
This structural example assumes an existing 16:9 deck with a valid `overview` slide target. The supplied deck determines the actual path and target.
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
version: 1
|
|
159
|
+
deck: ./slides.pptx
|
|
160
|
+
voice:
|
|
161
|
+
provider: edge-tts
|
|
162
|
+
voice: en-US-AriaNeural
|
|
163
|
+
output:
|
|
164
|
+
width: 1920
|
|
165
|
+
height: 1080
|
|
166
|
+
fps: 30
|
|
167
|
+
media: []
|
|
168
|
+
narration:
|
|
169
|
+
- id: welcome
|
|
170
|
+
text: "Here is the main idea."
|
|
171
|
+
scenes:
|
|
172
|
+
- id: opening
|
|
173
|
+
slide: overview
|
|
174
|
+
actions:
|
|
175
|
+
- id: say-welcome
|
|
176
|
+
type: speak
|
|
177
|
+
segment: welcome
|
|
178
|
+
- id: opening-hold
|
|
179
|
+
type: hold
|
|
180
|
+
duration_ms: 1000
|
|
181
|
+
cues: []
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
For Slidev, set `deck` to your Markdown presentation path, such as `./slides.md`, and use its slide's frontmatter name as the scene's `slide` value.
|
|
185
|
+
|
|
186
|
+
## Revision effects and unsupported fields
|
|
187
|
+
|
|
188
|
+
Changing narration text, voice, provider options or adapter version invalidates the matching speech cache entry. The new audio has new paired alignment. Dependent phrase cues and the timeline are resolved again. Old audio, alignment or hand-edited generated timestamps cannot establish the new timing.
|
|
189
|
+
|
|
190
|
+
Changing only a hold can reuse unchanged speech through a matching cache. A changed storyboard or deck requires a new run. Existing completed stages cannot be resumed against edited inputs.
|
|
191
|
+
|
|
192
|
+
The YAML has no fields for output filenames, run directories, caches, credentials, timeouts or timing-verification mode. Those belong to CLI options or the environment. It also has no arbitrary absolute action timestamp or dedicated settings for captions, background music or automatic ducking. Extra fields are rejected rather than silently interpreted.
|
|
193
|
+
|
|
194
|
+
## Version 2 marker highlights
|
|
195
|
+
|
|
196
|
+
Version 2 keeps all v1 fields and requires `annotations`. Its [schema](../../../schemas/storyboard.v2.json) accepts only the implemented `highlight` effect. Each annotation has globally unique `id`, `scene`, `target`, `effect`, `appearance`, `at` and `duration_ms` fields. The `at` object has exactly the phrase-cue semantics above, including occurrence, boundary and offset. The phrase must belong to narration scheduled in that scene.
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
annotations:
|
|
200
|
+
- id: title-marker
|
|
201
|
+
scene: opening
|
|
202
|
+
target:
|
|
203
|
+
type: element
|
|
204
|
+
selector: h1
|
|
205
|
+
effect: highlight
|
|
206
|
+
appearance:
|
|
207
|
+
color: '#ffff00'
|
|
208
|
+
opacity: 0.35
|
|
209
|
+
padding: { units: normalized, x: 0.005, y: 0.005 }
|
|
210
|
+
at:
|
|
211
|
+
segment: introduction
|
|
212
|
+
phrase: A storyboard
|
|
213
|
+
boundary: start
|
|
214
|
+
offset_ms: 0
|
|
215
|
+
duration_ms: 2000
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Run `slidevideo inspect --storyboard slidevideo.yaml --json` in your presentation folder to find targets in your deck before adapting this example.
|
|
219
|
+
|
|
220
|
+
| Target | Fields | Adapter |
|
|
221
|
+
| --- | --- | --- |
|
|
222
|
+
| Region | `type: region`, `units: normalized`, `x`, `y`, `width`, `height` | Both. Coordinates use the top-left slide origin, with x/width relative to slide width and y/height relative to slide height. |
|
|
223
|
+
| Element | `type: element`, nonempty CSS `selector` | Slidev. Exactly one existing visible element in the active audience slide. |
|
|
224
|
+
| Shape | `type: shape`, positive integer `id` | PowerPoint. Existing native shape ID within the active slide, returned by inspection. Names are descriptions, not identities. |
|
|
225
|
+
|
|
226
|
+
Regions require x/y in `[0,1]`, positive width/height at most one, and x+width/y+height at most one. Appearance color is `#RRGGBB`; opacity is greater than zero and at most one. Padding has explicit `units: normalized` and x/y from zero to one, applied on each side relative to slide width/height. Expanded rectangles clip to slide bounds. Pixel mapping uses the actual captured slide-content rectangle, including letterboxing, rather than assuming the slide fills the output. Edges round outward to captured pixels before clipping.
|
|
227
|
+
|
|
228
|
+
Optional `appearance.blend` accepts `source-over` or `darken`, with `source-over` as the default. `darken` combines each channel using the darker source or captured value before applying opacity, retaining dark lettering on light backgrounds.
|
|
229
|
+
|
|
230
|
+
Optional `appearance.bottom_border` has required `color`, `opacity`, `units: normalized` and `height` fields. Color and opacity use the fill ranges; height is greater than zero and at most one, relative to actual slide-content height. The accent extends below the padded rectangle and clips to slide and viewport bounds. It uses normal alpha compositing and exactly the fill's half-open interval. A height of `1/300` represents a 3-pixel accent in a 900-pixel-high source slide. Authored YAML must use the numeric value, such as `0.0033333333333333335`.
|
|
231
|
+
|
|
232
|
+
Requested final-frame verification reports fill and bottom-border checks separately. Thin accents may be unobservable at the analysis resolution and fail requested proof explicitly. Normal production still leaves timing unevaluated.
|
|
233
|
+
|
|
234
|
+
The duration is positive milliseconds. An interval containing no output frame at the selected frame rate fails with `ANNOTATION_FRAME_RANGE`. Intervals are half-open `[start,end)` and do not extend scenes. They must fit one scene, slide visit and settled reveal state. A highlight may end exactly at a navigation/reveal boundary, but cannot cross it or start during settling. Array order is the drawing order; later annotations cover earlier ones. The first active frame is the first output frame at or after the resolved start, and removal begins on the first frame at or after the end.
|
|
235
|
+
|
|
236
|
+
Targets are stationary, visible and axis-aligned. Missing, ambiguous, hidden, rotated, reflected, grouped, masked, clipped or moving targets fail with annotation context. Slidev excludes navigation, notes and duplicate hidden slide instances and samples geometry each animation frame. Native shape support excludes groups and members, cropped pictures, paragraph animations and hide/dim-after-animation effects; supported entrances must have settled. PowerPoint schedules native geometry samples 50 ms apart. A change exceeding 0.5 output pixels invalidates the target. Sampling establishes the documented subset, not arbitrary moving-target tracking or pixel recognition.
|
|
237
|
+
|
|
238
|
+
For a PowerPoint shape, use a target such as `{ type: shape, id: 2 }` when inspection lists that ID on the selected slide. Inspect the deck in desktop PowerPoint on Windows to determine native layout and visibility.
|
|
239
|
+
|
|
240
|
+
Raw captures contain no highlights. The shared assembler draws them after capture without stretching narration or freezing slide animation. Normal output retains timing `not_evaluated`. Requested timing verification also decodes final frames and checks the expected visible/clear state near both interval boundaries. Tiny, low-contrast or fully obscured regions, or an end with no following output frame, cannot establish this proof and fail explicitly. No extra effect, entrance/exit animation, text-range discovery or word following is accepted.
|
|
241
|
+
|
|
242
|
+
## Version 2 image overlays
|
|
243
|
+
|
|
244
|
+
Add these root fields to a version 2 storyboard. Use your own image paths and scene IDs.
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
annotations: []
|
|
248
|
+
overlays:
|
|
249
|
+
- id: brand
|
|
250
|
+
src: assets/logo.png
|
|
251
|
+
box: { x: 0.79, y: 0.04, width: 0.17, height: 0.1 }
|
|
252
|
+
opacity: 0.45
|
|
253
|
+
hide_in_scenes: [opening]
|
|
254
|
+
- id: opening-logo
|
|
255
|
+
src: assets/title-logo.svg
|
|
256
|
+
box: { x: 0.35, y: 0.36, width: 0.3, height: 0.28 }
|
|
257
|
+
opacity: 0.8
|
|
258
|
+
scene: opening
|
|
259
|
+
visible:
|
|
260
|
+
- { start: 0, end: 1200, fade_out_ms: 200 }
|
|
261
|
+
- { start: 1700, end: 2400, fade_in_ms: 200 }
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
`brand` appears throughout the video except in `opening`. The replacement `opening-logo` appears during two intervals in that scene. Give each declaration a unique ID. Omit `scene` for video scope and omit `visible` to cover the whole scope.
|
|
265
|
+
|
|
266
|
+
- `box` uses fractions of output width and height, measured from the top-left corner. Keep it within the frame. The compositor centers the image inside the box and preserves its aspect ratio.
|
|
267
|
+
- `opacity` ranges from zero to one and multiplies the image's alpha. Later entries draw above earlier entries.
|
|
268
|
+
- Each `visible` interval includes its start and excludes its end. Numeric boundaries use milliseconds from the start of the selected scope. A boundary can also use the same phrase object as a cue's `at` field. Scene-scoped phrase boundaries refer to narration from that scene.
|
|
269
|
+
- `fade_in_ms` and `fade_out_ms` default to zero. Intervals must fit the scope, stay disjoint, and leave time for both fades. `hide_in_scenes` takes precedence over visibility intervals for a video-wide overlay.
|
|
270
|
+
- Use a PNG or a static SVG with intrinsic dimensions or a view box. SVG supports groups, paths, rectangles, circles, ellipses, lines, polylines, polygons, transforms, and explicit solid fill and stroke attributes. Convert text to paths. External resources, stylesheets, gradients, masks, and animation are unsupported.
|
|
271
|
+
|
|
272
|
+
Image overlays appear in exported MP4s. Build the video to review them. Use `slidevideo setup --license` to manage watermark-free activation.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import html
|
|
3
|
+
import json
|
|
4
|
+
import sys
|
|
5
|
+
import edge_tts
|
|
6
|
+
|
|
7
|
+
async def main():
|
|
8
|
+
request = json.load(open(sys.argv[1], encoding="utf-8"))
|
|
9
|
+
communicate = edge_tts.Communicate(request["text"], request["voice"], boundary="WordBoundary", **request["options"])
|
|
10
|
+
words = []
|
|
11
|
+
with open(request["audio"], "wb") as audio:
|
|
12
|
+
async for chunk in communicate.stream():
|
|
13
|
+
if chunk["type"] == "audio":
|
|
14
|
+
audio.write(chunk["data"])
|
|
15
|
+
elif chunk["type"] == "WordBoundary":
|
|
16
|
+
words.append({"text": html.unescape(chunk["text"]), "start_ms": chunk["offset"] / 10000, "end_ms": (chunk["offset"] + chunk["duration"]) / 10000})
|
|
17
|
+
print(json.dumps({"words": words, "version": edge_tts.__version__}))
|
|
18
|
+
|
|
19
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was autogenerated by uv via the following command:
|
|
2
|
+
# uv pip compile requirements.txt -o requirements.lock
|
|
3
|
+
aiohappyeyeballs==2.7.1
|
|
4
|
+
# via aiohttp
|
|
5
|
+
aiohttp==3.14.5
|
|
6
|
+
# via edge-tts
|
|
7
|
+
aiosignal==1.4.0
|
|
8
|
+
# via aiohttp
|
|
9
|
+
attrs==26.1.0
|
|
10
|
+
# via aiohttp
|
|
11
|
+
certifi==2026.10.23
|
|
12
|
+
# via edge-tts
|
|
13
|
+
edge-tts==7.3.1
|
|
14
|
+
# via -r requirements.txt
|
|
15
|
+
frozenlist==1.8.0
|
|
16
|
+
# via
|
|
17
|
+
# aiohttp
|
|
18
|
+
# aiosignal
|
|
19
|
+
idna==3.20
|
|
20
|
+
# via yarl
|
|
21
|
+
multidict==7.2.1
|
|
22
|
+
# via
|
|
23
|
+
# aiohttp
|
|
24
|
+
# yarl
|
|
25
|
+
propcache==0.5.4
|
|
26
|
+
# via
|
|
27
|
+
# aiohttp
|
|
28
|
+
# yarl
|
|
29
|
+
tabulate==0.10.0
|
|
30
|
+
# via edge-tts
|
|
31
|
+
typing-extensions==4.16.0
|
|
32
|
+
# via edge-tts
|
|
33
|
+
yarl==1.25.1
|
|
34
|
+
# via aiohttp
|