@clipwright/core 0.69.0 → 0.70.0
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/dist/own-agent-runs.d.ts +8 -0
- package/dist/own-agent-runs.js +15 -0
- package/package.json +1 -1
package/dist/own-agent-runs.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare const FILM_EDIT_CAPTION_POSITIONS: readonly ["top", "middle", "bo
|
|
|
91
91
|
export declare const FILM_EDIT_CAPTION_STYLES: readonly ["outline", "banner", "badge"];
|
|
92
92
|
export declare const FILM_EDIT_CAPTION_ALIGNS: readonly ["center", "left"];
|
|
93
93
|
export declare const EDIT_CLIP_MIN_VOLUME_DB = -24, EDIT_CLIP_MAX_VOLUME_DB = 3;
|
|
94
|
+
export declare const EDIT_AMBIENCE_MIN_VOLUME_DB = -40, EDIT_AMBIENCE_MAX_VOLUME_DB = -18, EDIT_AMBIENCE_DEFAULT_VOLUME_DB = -20, EDIT_AMBIENCE_MIN_SPAN_SEC = 1;
|
|
94
95
|
export declare const filmEditInput: z.ZodObject<{
|
|
95
96
|
clips: z.ZodArray<z.ZodObject<{
|
|
96
97
|
run_id: z.ZodOptional<z.ZodString>;
|
|
@@ -196,6 +197,13 @@ export declare const filmEditInput: z.ZodObject<{
|
|
|
196
197
|
fade_out: z.ZodDefault<z.ZodNumber>;
|
|
197
198
|
duck: z.ZodOptional<z.ZodBoolean>;
|
|
198
199
|
}, z.core.$strict>>;
|
|
200
|
+
ambience: z.ZodOptional<z.ZodObject<{
|
|
201
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
202
|
+
asset_id: z.ZodOptional<z.ZodString>;
|
|
203
|
+
from: z.ZodNumber;
|
|
204
|
+
to: z.ZodNumber;
|
|
205
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
199
207
|
ad_id: z.ZodOptional<z.ZodString>;
|
|
200
208
|
max_credits: z.ZodOptional<z.ZodNumber>;
|
|
201
209
|
}, z.core.$strict>;
|
package/dist/own-agent-runs.js
CHANGED
|
@@ -88,6 +88,18 @@ const editClip = z.strictObject({
|
|
|
88
88
|
.refine(clip => clip.sound !== true || clip.run_id !== undefined, { path: ["sound"], message: "a clip's own sound is kept only from a generate_video run made with audio: true" })
|
|
89
89
|
.refine(clip => clip.sound !== true || clip.speed === 1, { path: ["sound"], message: "a clip's own sound plays at speed 1 only" })
|
|
90
90
|
.refine(clip => clip.sound === true || (clip.speech === undefined && clip.volume === undefined), { path: ["sound"], message: "speech and volume describe a clip's own sound: they need sound: true" });
|
|
91
|
+
export const EDIT_AMBIENCE_MIN_VOLUME_DB = -40, EDIT_AMBIENCE_MAX_VOLUME_DB = -18, EDIT_AMBIENCE_DEFAULT_VOLUME_DB = -20, EDIT_AMBIENCE_MIN_SPAN_SEC = 1;
|
|
92
|
+
const editAmbience = z.strictObject({
|
|
93
|
+
run_id: runId.optional().describe("A delivered generate_video run of this account made with audio: true, whose own sound is the place's"),
|
|
94
|
+
asset_id: assetId.optional().describe("Instead of run_id: a video asset of this account with its own sound"),
|
|
95
|
+
from: editSecond.describe("The second of the clip the room sound starts at"),
|
|
96
|
+
to: editSecond.describe(`The second of the clip it ends at, at least ${EDIT_AMBIENCE_MIN_SPAN_SEC} s after from: a stretch with no one speaking ` +
|
|
97
|
+
"and no sharp sound in it"),
|
|
98
|
+
volume: z.number().min(EDIT_AMBIENCE_MIN_VOLUME_DB).max(EDIT_AMBIENCE_MAX_VOLUME_DB).default(EDIT_AMBIENCE_DEFAULT_VOLUME_DB)
|
|
99
|
+
.describe(`dB from the level of speech: ${EDIT_AMBIENCE_DEFAULT_VOLUME_DB} (the default) is a quiet room under the voice, ` +
|
|
100
|
+
`${EDIT_AMBIENCE_MAX_VOLUME_DB} the loudest`),
|
|
101
|
+
}).refine(a => (a.run_id === undefined) !== (a.asset_id === undefined), "name the room sound by run_id or by asset_id, one of them")
|
|
102
|
+
.refine(a => a.to - a.from >= EDIT_AMBIENCE_MIN_SPAN_SEC - 1e-9, { path: ["to"], message: `the room sound is taken from at least ${EDIT_AMBIENCE_MIN_SPAN_SEC} s: to must be that far after from` });
|
|
91
103
|
const voicePiece = z.strictObject({
|
|
92
104
|
from: editSecond.describe("The second of the take the piece starts at (make_voice words give each word's start and end)"),
|
|
93
105
|
to: editSecond.describe("The second of the take the piece ends at, after from"),
|
|
@@ -126,6 +138,9 @@ export const filmEditInput = z.strictObject({
|
|
|
126
138
|
.describe("Seconds the last frame is held at the end, for the packshot"),
|
|
127
139
|
music: editMusic.optional().describe("Music from at to the end: a library track (free) or one made for the cut (paid on delivery); " +
|
|
128
140
|
"under a voice it plays lower"),
|
|
141
|
+
ambience: editAmbience.optional().describe("Free: the place's quiet room sound, a stretch of one of your clips' own sound repeated " +
|
|
142
|
+
"smoothly under the whole cut whatever its windows and their speed, so every window can play silent and sped up. It never lowers the " +
|
|
143
|
+
"music and the voice stays on top of it; it goes with a voice, music or a clip's own sound"),
|
|
129
144
|
ad_id: adId.optional().describe("The ad record this cut belongs to: every clip then names its slot, and a clip made with generate_video " +
|
|
130
145
|
"that has not passed check_take in its slot is refused before any credits, unless the slot is people_only; your own footage needs no check"),
|
|
131
146
|
max_credits: maxCreditsField,
|