Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

docs: refine speech program facade

kashorinbc4371194a88
diff --git a/README.md b/README.md
index 3d70922b..6fab20d7 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,9 @@ compiler.
[`examples/composite-speech-program/minimal.svml`](examples/composite-speech-program/minimal.svml)
and its adjacent `speech-program.svk` define the proposed `composite-v1` author
surface: one transparent Component replaces repeated Basis/Locator wiring while
-both internal instances remain independently visible in Plan and lock.
+both internal instances remain independently visible in Plan and lock. Its
+`SpeechProgram` output is only a typed alias bundle, per-Segment joins are author
+data consumed by one assembler, and the Component has no ambient document access.
## Specification
diff --git a/examples/composite-speech-program/README.md b/examples/composite-speech-program/README.md
index 2707c390..890b7e58 100644
--- a/examples/composite-speech-program/README.md
+++ b/examples/composite-speech-program/README.md
@@ -5,8 +5,8 @@ profile.
- `minimal.svml` is the author-facing source.
- `speech-program.svk` defines a callable Component that statically expands
- `crossfade-speech` and `speech-locator`.
-- `house.svs` configures only the Composite's public `overlap` parameter.
+ `speech-assemble` and `speech-locator`.
+- `house.svs` configures only the Composite's public join shorthand.
For `<speech-program id="voice">`, canonical expansion creates the internal
instances `voice::basis` and `voice::locator`. Their implementations, digests,
@@ -14,14 +14,36 @@ Evidence and Artifacts remain independently visible in Plan and lock. The outer
ports are aliases:
```text
-voice.production = voice::basis.production
-voice.map = voice::locator.map
-voice.facets.visual = voice::basis.facets.visual
+voice.program.production = voice::basis.production
+voice.program.semantic = voice::locator.map
+voice.production = voice::basis.production
+voice.map = voice::locator.map
+voice.facets.visual = voice::basis.facets.visual
```
+`voice.program` is a typed port bundle whose fields alias the two internal
+outputs. It does not copy audio, facets, Evidence or Artifacts, and it does not
+replace the compiler's basis/map affinity check. The imported Film facade accepts
+the bundle as author-facing shorthand; after Composite expansion the Plan still
+contains the selected Basis and ExactSemanticMap separately.
+
+The default join and each `<join after="...">` are author data. They normalize to
+per-boundary `JoinSpec` values consumed by one `speech-assemble` instance; they do
+not select a language-level family or mode. `after` names a stable Segment id, and
+the following Segment comes from source order. A join cannot declare both `gap`
+and `overlap`.
+
+An implementation may retain `speech-spine` as a compatibility facade for V1
+authors. It remains an ordinary imported Composite, never a compiler keyword or a
+required singleton. Alternative Locators use explicit low-level wiring or another
+Composite instead of extending a closed `locator="..."` enum.
+
The bracket expression in `ports.script.segment[item.id]` is a stable id-keyed
lookup, not a positional array lookup. The `for` iterates only over finite children
declared at the call site.
+The Composite receives its Script through an explicit typed input. Reading
+`document.script` or any other ambient caller state is forbidden.
+
The current compiler must reject or clearly report unsupported `composite-v1`;
these files are architecture fixtures, not executable regression inputs.
diff --git a/examples/composite-speech-program/house.svs b/examples/composite-speech-program/house.svs
index 29544254..3aed91b3 100644
--- a/examples/composite-speech-program/house.svs
+++ b/examples/composite-speech-program/house.svs
@@ -1,7 +1,13 @@
<sheet version="1" id="house">
speech-program.default {
- overlap: 500ms;
+ join: cut;
+ join-duration: 0ms;
+ }
+
+ speech-program.smooth {
+ join: crossfade;
+ join-duration: 500ms;
}
</sheet>
diff --git a/examples/composite-speech-program/minimal.svml b/examples/composite-speech-program/minimal.svml
index d5f4836d..f2783a8e 100644
--- a/examples/composite-speech-program/minimal.svml
+++ b/examples/composite-speech-program/minimal.svml
@@ -36,6 +36,13 @@
source={host}
sourceWindow="5s .. 10s"
/>
+
+ <join
+ after="intro"
+ overlap="500ms"
+ audio="crossfade"
+ visual="dissolve"
+ />
</speech-program>
<media-track id="aroll">
@@ -46,10 +53,7 @@
/>
</media-track>
- <film
- basis={voice.production}
- semantic={voice.map}
- >
+ <film program={voice.program}>
<track ref={aroll.track}/>
</film>
diff --git a/examples/composite-speech-program/speech-program.svk b/examples/composite-speech-program/speech-program.svk
index cac5f402..a00423d6 100644
--- a/examples/composite-speech-program/speech-program.svk
+++ b/examples/composite-speech-program/speech-program.svk
@@ -19,6 +19,13 @@
cardinality="one"
/>
+ <port
+ name="program"
+ direction="output"
+ type="SpeechProgram"
+ cardinality="one"
+ />
+
<port
name="map"
direction="output"
@@ -34,7 +41,14 @@
/>
<param
- name="overlap"
+ name="join"
+ type="enum(cut,crossfade,gap)"
+ default="cut"
+ />
+
+ <param
+ name="joinDuration"
+ style="join-duration"
type="duration"
default="0ms"
/>
@@ -45,9 +59,17 @@
<field name="sourceWindow" type="SourceRange"/>
</child>
+ <child name="join" cardinality="zero-or-more">
+ <field name="after" type="id" required="true"/>
+ <field name="overlap" type="duration"/>
+ <field name="gap" type="duration"/>
+ <field name="audio" type="enum(cut,crossfade)"/>
+ <field name="visual" type="enum(cut,dissolve)"/>
+ </child>
+
<import
as="basis-component"
- from="@svml/std/crossfade-speech.svk"
+ from="@svml/std/speech-assemble.svk"
/>
<import
@@ -59,7 +81,8 @@
<basis-component
id="basis"
- overlap={params.overlap}
+ defaultJoin={params.join}
+ defaultJoinDuration={params.joinDuration}
>
<for each={children.segment} as="item">
<segment
@@ -69,6 +92,16 @@
sourceWindow={item.sourceWindow}
/>
</for>
+
+ <for each={children.join} as="join">
+ <join
+ after={join.after}
+ overlap={join.overlap}
+ gap={join.gap}
+ audio={join.audio}
+ visual={join.visual}
+ />
+ </for>
</basis-component>
<locator-component
@@ -87,6 +120,13 @@
value={locator.map}
/>
+ <export port="program">
+ <value
+ production={basis.production}
+ semantic={locator.map}
+ />
+ </export>
+
<export
port="facets.visual"
value={basis.facets.visual}