@clipwright/core 0.47.0 → 0.49.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/contract-dispositions.d.ts +163 -42
- package/dist/contract-dispositions.js +3 -2
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +474 -98
- package/dist/contracts/v1/workflow-brief.js +9 -1
- package/dist/contracts/v1/workflow-brief.js.map +1 -1
- package/dist/contracts/v1/workflow-catalog.d.ts +474 -98
- package/dist/contracts/v1/workflow-client.d.ts +253 -49
- package/dist/contracts/v1/workflow-client.js +2 -1
- package/dist/contracts/v1/workflow-client.js.map +1 -1
- package/dist/contracts/v1/workflow-execution.d.ts +16 -0
- package/dist/contracts/v1/workflow-next.d.ts +8 -0
- package/dist/contracts/v1/workflow-plan.d.ts +710 -147
- package/dist/contracts/v1/workflow-run-read.d.ts +4 -0
- package/dist/endpoints.js +21 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/faceless-price.d.ts +34 -1
- package/dist/faceless-price.js +19 -3
- package/dist/faceless-price.js.map +1 -1
- package/dist/faceless-public.d.ts +217 -51
- package/dist/faceless-public.js +64 -15
- package/dist/faceless-public.js.map +1 -1
- package/dist/faceless-voices.d.ts +5 -1
- package/dist/faceless-voices.js +18 -4
- package/dist/faceless-voices.js.map +1 -1
- package/dist/film-drafts.d.ts +251 -0
- package/dist/film-drafts.js +92 -0
- package/dist/film-drafts.js.map +1 -0
- package/dist/film-guide.d.ts +74 -0
- package/dist/film-guide.js +42 -0
- package/dist/film-guide.js.map +1 -0
- package/dist/film-styles.d.ts +109 -0
- package/dist/film-styles.js +29 -0
- package/dist/film-styles.js.map +1 -0
- package/dist/generation-shot.d.ts +100 -0
- package/dist/generation-shot.js +129 -0
- package/dist/generation-shot.js.map +1 -0
- package/dist/generations.d.ts +69 -3
- package/dist/generations.js +37 -3
- package/dist/generations.js.map +1 -1
- package/dist/idempotency.d.ts +3 -0
- package/dist/idempotency.js +6 -0
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/openapi.js +14 -0
- package/dist/openapi.js.map +1 -1
- package/dist/own-agent-price.d.ts +53 -0
- package/dist/own-agent-price.js +67 -0
- package/dist/own-agent-price.js.map +1 -0
- package/dist/own-agent-runs.d.ts +186 -0
- package/dist/own-agent-runs.js +110 -0
- package/dist/own-agent-runs.js.map +1 -0
- package/dist/prices.js +27 -14
- package/dist/prices.js.map +1 -1
- package/dist/reference-lyrics.d.ts +47 -0
- package/dist/reference-lyrics.js +39 -0
- package/dist/reference-lyrics.js.map +1 -0
- package/dist/resolved-timeline.d.ts +3 -3
- package/dist/run-static-warnings.js +3 -1
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/scene-place.d.ts +5 -2
- package/dist/scene-place.js +8 -2
- package/dist/scene-place.js.map +1 -1
- package/dist/skill-theme-explainer.d.ts +2 -0
- package/dist/skill-theme-explainer.js +64 -0
- package/dist/skill-theme-explainer.js.map +1 -0
- package/dist/skill-theme.d.ts +161 -0
- package/dist/skill-theme.js +274 -0
- package/dist/skill-theme.js.map +1 -0
- package/dist/skills.d.ts +745 -120
- package/dist/skills.js +47 -15
- package/dist/skills.js.map +1 -1
- package/dist/ugc-scenes.d.ts +9 -4
- package/dist/ugc-scenes.js +27 -3
- package/dist/ugc-scenes.js.map +1 -1
- package/dist/voice-admission.d.ts +233 -47
- package/dist/workflows/methods/faceless-explainer.d.ts +162 -55
- package/dist/workflows/methods/kinetic-launch.d.ts +162 -55
- package/dist/workflows/methods/product-image-story.d.ts +162 -55
- package/dist/workflows/methods/reference-remake.d.ts +162 -55
- package/dist/workflows/methods/shared.d.ts +162 -55
- package/dist/workflows/methods/ugc-faq-answer.d.ts +162 -55
- package/dist/workflows/methods/ugc-product-intro.d.ts +162 -55
- package/dist/workflows/methods/website-proof-demo.d.ts +162 -55
- package/dist/workflows/reference-remake.d.ts +57 -0
- package/dist/workflows/reference-remake.js +139 -11
- package/dist/workflows/reference-remake.js.map +1 -1
- package/dist/workflows/validate.js +1 -1
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,8 @@ import { referenceProfileInput } from '../reference-profile.js';
|
|
|
11
11
|
import { narrationPaceFromVoice, PAUSE_TRIM_CEILING_S, pauseTrimFromVoice } from '../reference-voice.js';
|
|
12
12
|
import { AD_PAUSE_TRIM } from '../ad-pause-trim.js';
|
|
13
13
|
import { countActorShots, coverWordOf, lexicalTokens, planSemanticInserts, quoteOccurrences } from '../semantic-inserts.js';
|
|
14
|
-
import {
|
|
14
|
+
import { negationIn, SHOT_BEAT_MAX_S } from '../generation-shot.js';
|
|
15
|
+
import { actorId, callStage, insertBox, isNarratedUgcInput, LIVE_SHOT_PRODUCT_PLACEMENTS, makeUgcInput, makeUgcInputShape, MAX_INSERTS, MAX_LIVE_SHOTS, MAX_NARRATED_ACTOR_SHOTS, MAX_PRESENTER_TAKES, MAX_SHOT_CAST, motionStyle, ugcCall, ugcLiveShotCastMember, ugcTemplate } from '../skills.js';
|
|
15
16
|
import { ugcMarkedComponentsRefusal } from '../presenter-takes.js';
|
|
16
17
|
import { CALL_PHONE_DEFAULTS, CALL_STAGE_SIDES } from '../ugc-call.js';
|
|
17
18
|
import { MAX_TEMPLATES, TEMPLATE_ENTER_FRAMES, TEMPLATE_KIND_IDS, TEMPLATE_KINDS, TEMPLATE_PLACEMENTS, templateFaceWarnings, templateMediaOf, templateTextRefusal } from '../templates/index.js';
|
|
@@ -32,6 +33,8 @@ import { lookName } from './motion-director.js';
|
|
|
32
33
|
import { preferChosen } from './remake-chooser.js';
|
|
33
34
|
import { beatCue, FLASH_SNAP_S, planMotion } from './remake-motion.js';
|
|
34
35
|
// The reference-remake compiler (#857 S2a): a profile and an accepted script become a complete plan whose native input is a make_ugc input.
|
|
36
|
+
/** The steps a product demo takes, then a still hold (#1307 S2): with the hold, at most four beats in one clip. */
|
|
37
|
+
export const DEMO_MAX_STEPS = 3;
|
|
35
38
|
const remakeFields = {
|
|
36
39
|
plan_id: workflowId.optional(), base_version: saveWorkflowPlan.shape.base_version.optional(),
|
|
37
40
|
review_notes: z.array(workflowText(2000)).max(50).optional(),
|
|
@@ -67,6 +70,20 @@ const remakeFields = {
|
|
|
67
70
|
.refine(cast => new Set(cast.map(person => person.asset_id)).size === cast.length, { message: 'each cast picture appears once' }).optional()
|
|
68
71
|
.describe(`Up to ${MAX_SHOT_CAST} more people beside the actor in every acting live shot, as make_ugc shots cast: a picture, a role and ` +
|
|
69
72
|
'what they do. Without an acting live shot the plan names it undrawn.'),
|
|
73
|
+
pause_trim: makeUgcInputShape.pause_trim.describe('Narration pauses, as make_ugc pause_trim; it wins over the reference\'s pauses. ' +
|
|
74
|
+
`Omitted: the reference presenter's measured pauses, else ${AD_PAUSE_TRIM.sentence_end_s} and ${AD_PAUSE_TRIM.comma_s}.`),
|
|
75
|
+
product: z.strictObject({
|
|
76
|
+
asset_id: assetId.describe('Your product image (ast_…), as make_ugc product_asset_id.'),
|
|
77
|
+
placement: z.enum(LIVE_SHOT_PRODUCT_PLACEMENTS).default('hand').describe('hand: every acting live shot starts with it in the actor\'s hand; ' +
|
|
78
|
+
'beside: standing within reach.'),
|
|
79
|
+
name: z.string().trim().min(1).max(40).default('product').describe('What it is, as the shots name it: jar, bottle, drill.'),
|
|
80
|
+
demo: z.array(z.strictObject({
|
|
81
|
+
action: z.string().trim().min(1).max(300).describe('One step of using it, done once, as cause, contact and result: her fingertip dips ' +
|
|
82
|
+
'into the jar once and lifts a dab of cream.'),
|
|
83
|
+
end_state: z.string().trim().min(1).max(200).describe('What the frame shows when the step ends: a dab of cream sits on her fingertip.'),
|
|
84
|
+
})).min(1).max(DEMO_MAX_STEPS).optional().describe('The reference\'s demo beats become one live shot of the actor using it, from a first ' +
|
|
85
|
+
'frame with it in hand, in these steps, then a still hold. Describe what is visible.'),
|
|
86
|
+
}).optional().describe('Your product in the actor\'s hand (or beside them) in every acting live shot.'),
|
|
70
87
|
};
|
|
71
88
|
const revisionPair = (value, context) => {
|
|
72
89
|
if ((value.plan_id === undefined) !== (value.base_version === undefined)) {
|
|
@@ -119,6 +136,43 @@ const GESTURE_ACTIONS = { both_hands_to_viewer: 'reaches both hands toward the v
|
|
|
119
136
|
hold_object: 'holds an object up to the camera', open_palms: 'opens both palms toward the viewer', wave: 'waves at the viewer', shrug: 'shrugs',
|
|
120
137
|
thumbs_up: 'gives a thumbs up', other: undefined };
|
|
121
138
|
const REACTION = 'reacts to the words with a warm smile and a nod';
|
|
139
|
+
/** The longest demo clip: the longest live shot take the run renders. Words past it are the presenter's usual take. */
|
|
140
|
+
export const DEMO_CLIP_MAX_S = 15;
|
|
141
|
+
const heldAt = (product) => product.placement === 'hand' ? `in one hand at chest height, its label to the camera`
|
|
142
|
+
: 'standing beside the presenter within reach, its label to the camera';
|
|
143
|
+
/** A gesture's action with the product named when the gesture holds something. */
|
|
144
|
+
const gestureAction = (kind, product) => kind === 'hold_object' && product ? `holds the ${product.name} up to the camera, its label toward the lens` : GESTURE_ACTIONS[kind];
|
|
145
|
+
/** The demo as one clip of `seconds` (#1307 S2): it opens on one product already where the shots hold it, each step once, then a still hold;
|
|
146
|
+
* every second is owned by a beat, so the clip has no seconds to repeat a step in. */
|
|
147
|
+
export function demoShot(product, seconds) {
|
|
148
|
+
const hold = product.placement === 'hand'
|
|
149
|
+
? { action: `The presenter holds the ${product.name} still at chest height, its label to the camera, and smiles`,
|
|
150
|
+
end_state: `The presenter holds the ${product.name} at chest height, its label to the camera` }
|
|
151
|
+
: { action: `The presenter rests both hands beside the ${product.name} and smiles at the camera`,
|
|
152
|
+
end_state: `The ${product.name} stands beside the presenter, its label to the camera` };
|
|
153
|
+
// The hold goes last whenever the clip has a second for it: without it the clip's last seconds repeat a step. Short of seconds, the steps
|
|
154
|
+
// become one beat that does each in turn.
|
|
155
|
+
const merged = { action: product.demo.map(step => step.action.replace(/[.!?]+$/, '')).join(', then '), end_state: product.demo.at(-1).end_state };
|
|
156
|
+
const steps = seconds >= product.demo.length + 1 ? [...product.demo, hold] : seconds >= 2 ? [merged, hold] : [merged];
|
|
157
|
+
const length = Math.max(steps.length, Math.min(seconds, steps.length * SHOT_BEAT_MAX_S)), base = Math.floor(length / steps.length);
|
|
158
|
+
let from = 0;
|
|
159
|
+
const beats = steps.map((step, at) => {
|
|
160
|
+
const to = from + base + (at < length - base * steps.length ? 1 : 0), beat = { from_s: from, to_s: to, action: step.action, end_state: step.end_state };
|
|
161
|
+
from = to;
|
|
162
|
+
return beat;
|
|
163
|
+
});
|
|
164
|
+
return {
|
|
165
|
+
framing: { size: 'medium' },
|
|
166
|
+
subject: { label: 'the presenter', fixed: ['the face, hair and clothes of Image 1', `the ${product.name}'s shape, colours and printed label`],
|
|
167
|
+
objects: [{ name: product.name, count: 1, at_start: heldAt(product) }] },
|
|
168
|
+
start_state: product.placement === 'hand' ? `The presenter holds one ${product.name} in one hand at chest height, its label to the camera`
|
|
169
|
+
: `One ${product.name} stands beside the presenter within reach, its label to the camera`,
|
|
170
|
+
beats,
|
|
171
|
+
camera: { move: 'static' },
|
|
172
|
+
light: { key: 'the light of Image 1' },
|
|
173
|
+
continuity: { persistent: [`exactly one ${product.name}`, 'the same place as Image 1'], end_state: beats.at(-1).end_state },
|
|
174
|
+
};
|
|
175
|
+
}
|
|
122
176
|
const SHOT_SIZE_RANK = { close: 0, wide: 1, full: 2 };
|
|
123
177
|
/** An acting shot's first frame, wider than the take (#1175 S7): the beat's measured size when wider (medium and wide are the wide view), else */
|
|
124
178
|
/** wide on a close take, since an action needs the hands in frame; undefined keeps the take's view. */
|
|
@@ -320,6 +374,14 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
320
374
|
if (!parsed.success)
|
|
321
375
|
return { kind: 'invalid', issues: parsed.error.issues.map(issue => ({ kind: 'invalid_request', path: issue.path.join('.'), message: issue.message })) };
|
|
322
376
|
const request = parsed.data, { script } = request, profile = request.reference_profile;
|
|
377
|
+
// The product's words reach a clip model, which draws what a sentence names: they describe what is visible (#1307 S2).
|
|
378
|
+
const said = request.product ? [['product.name', request.product.name], ...(request.product.demo ?? []).flatMap((step, at) => [[`product.demo.${at}.action`, step.action], [`product.demo.${at}.end_state`, step.end_state]]),
|
|
379
|
+
// The cast acts in the demo clip beside its words.
|
|
380
|
+
...request.product.demo ? (request.cast ?? []).flatMap((person, at) => person.action ? [[`cast.${at}.action`, person.action]] : []) : []] : [];
|
|
381
|
+
const negated = said.flatMap(([path, text]) => { const word = negationIn(text); return word === null ? [] : [{ path, word }]; });
|
|
382
|
+
if (negated.length)
|
|
383
|
+
return { kind: 'invalid', issues: negated.map(({ path, word }) => ({ kind: 'invalid_request', path,
|
|
384
|
+
message: `"${word}" describes what is absent; describe what is visible instead (her fingertips are clean, the jar is closed)` })) };
|
|
323
385
|
const words = referenceScriptWords(script), tokens = lexicalTokens(script), language = captionLanguageOf(script);
|
|
324
386
|
if (words.length === 0)
|
|
325
387
|
return { kind: 'invalid', issues: [{ kind: 'invalid_request', path: 'script', message: 'The script has no words to place beats on.' }] };
|
|
@@ -1298,8 +1360,58 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1298
1360
|
const meets = (layer, start, end) => { const range = rangeOf(layer); return !!range && range.startWord < end && start < range.coverWord; };
|
|
1299
1361
|
const covers = (layer) => layer.field === 'inserts' || layer.field === 'layout_windows' || ((layer.field === 'templates' || layer.field === 'scenes')
|
|
1300
1362
|
&& (layer.item.placement ?? TEMPLATE_KINDS.find(entry => entry.kind === layer.kind)?.placements[0]) === 'full');
|
|
1363
|
+
const product = request.product;
|
|
1364
|
+
const holding = product ? { product: { placement: product.placement } } : {};
|
|
1365
|
+
// The reference's demo, with the product's steps given, is one clip of the actor using it (#1307 S2): adjacent demo beats join the first.
|
|
1366
|
+
const demoBeat = (index) => profile.beats[index].role === 'demo' && profile.beats[index].presenter_behaviour !== 'listening';
|
|
1367
|
+
const demoEnds = new Map(), joined = new Map();
|
|
1368
|
+
let lead;
|
|
1369
|
+
for (const { beat } of onScreen) {
|
|
1370
|
+
if (!demoBeat(beat)) {
|
|
1371
|
+
lead = undefined;
|
|
1372
|
+
continue;
|
|
1373
|
+
}
|
|
1374
|
+
if (lead !== undefined && spans[beat].start <= demoEnds.get(lead)) {
|
|
1375
|
+
demoEnds.set(lead, Math.max(demoEnds.get(lead), spans[beat].end));
|
|
1376
|
+
joined.set(beat, lead);
|
|
1377
|
+
}
|
|
1378
|
+
else {
|
|
1379
|
+
lead = beat;
|
|
1380
|
+
demoEnds.set(beat, spans[beat].end);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (product && !product.demo && shotsOn && shotsAsked) {
|
|
1384
|
+
for (const beat of demoEnds.keys()) {
|
|
1385
|
+
const group = [beat, ...[...joined].filter(([, head]) => head === beat).map(([at]) => at)].map(at => at + 1).join(', ');
|
|
1386
|
+
note(beat, `the reference's demo of the product (beats ${group})`, `the presenter's usual take: pass product.demo, the steps of using your ${product.name}, to show it in the presenter's hands`);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
/** The words a demo clip covers: up to the longest clip at the slowest pace, cut at a clause end inside it; the presenter says the rest. */
|
|
1390
|
+
const clipEnd = (start, end) => {
|
|
1391
|
+
const most = Math.floor(DEMO_CLIP_MAX_S * WORDS_PER_SECOND_MIN + 1e-9);
|
|
1392
|
+
if (end - start <= most)
|
|
1393
|
+
return end;
|
|
1394
|
+
const stop = words.slice(start, start + most).findLastIndex(word => word.stop !== undefined);
|
|
1395
|
+
return start + (stop >= 0 ? stop + 1 : most);
|
|
1396
|
+
};
|
|
1301
1397
|
const wanted = !shotsAsked || !shotsOn ? [] : onScreen.flatMap(({ beat: index }, at) => {
|
|
1302
1398
|
const beat = profile.beats[index], span = spans[index];
|
|
1399
|
+
if (product?.demo && demoEnds.has(index)) {
|
|
1400
|
+
const end = clipEnd(span.start, demoEnds.get(index));
|
|
1401
|
+
if ((call && resumeAt > span.start && resumeAt < end) || layers.some(layer => covers(layer) && meets(layer, span.start, end)))
|
|
1402
|
+
return [];
|
|
1403
|
+
if (end < demoEnds.get(index)) {
|
|
1404
|
+
note(index, `the demo's words past one clip (${DEMO_CLIP_MAX_S} s)`, `the presenter's usual take on the last ${demoEnds.get(index) - end} words`);
|
|
1405
|
+
}
|
|
1406
|
+
const wider = shotFramingOf(beat.shot_size, framing), demo = { ...product, demo: product.demo };
|
|
1407
|
+
const shot = { id: `ref-${index + 1}-shot`, kind: 'action', anchor: { startWord: span.start, endWord: end },
|
|
1408
|
+
action: demo.demo.map(step => step.action.replace(/[.!?]+$/u, '')).join(', then '), ...holding, ...wider ? { framing: wider } : {},
|
|
1409
|
+
...request.cast ? { cast: request.cast } : {}, shot: demoShot(demo, Math.ceil(((end - span.start) * duration) / words.length)) };
|
|
1410
|
+
const last = Math.max(index, ...[...joined].filter(([, head]) => head === index).map(([at]) => at));
|
|
1411
|
+
return [{ beat: index, words: end - span.start, shot, demo: last }];
|
|
1412
|
+
}
|
|
1413
|
+
if (joined.has(index) && product?.demo)
|
|
1414
|
+
return [];
|
|
1303
1415
|
if (beat.presenter_behaviour !== 'speaking' && beat.presenter_behaviour !== 'reacting')
|
|
1304
1416
|
return [];
|
|
1305
1417
|
if (request.live_shots === undefined && !beat.gestures?.length)
|
|
@@ -1309,17 +1421,19 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1309
1421
|
return [];
|
|
1310
1422
|
if (layers.some(layer => covers(layer) && meets(layer, span.start, span.end)))
|
|
1311
1423
|
return [];
|
|
1312
|
-
const action = [...new Set([...beat.gestures ?? []].sort((a, b) => a.at_s - b.at_s).flatMap(entry =>
|
|
1424
|
+
const action = [...new Set([...beat.gestures ?? []].sort((a, b) => a.at_s - b.at_s).flatMap(entry => gestureAction(entry.kind, product) ?? []))].join(', then ');
|
|
1313
1425
|
const acted = beat.presenter_behaviour === 'reacting' || !!action;
|
|
1314
1426
|
const wider = shotFramingOf(beat.shot_size, framing);
|
|
1315
|
-
// The request's cast stands beside the actor in every acting shot (#1192): those shots share one setup, so one cast.
|
|
1427
|
+
// The request's cast stands beside the actor in every acting shot (#1192): those shots share one setup, so one cast; so does the product.
|
|
1316
1428
|
const shot = { id: `ref-${index + 1}-shot`, anchor: { startWord: span.start, endWord: span.end },
|
|
1317
1429
|
...beat.presenter_behaviour === 'reacting' ? { kind: 'action', action: action || REACTION }
|
|
1318
1430
|
: action ? { kind: 'talking_action', action } : { kind: 'talking' },
|
|
1319
|
-
...acted && wider ? { framing: wider } : {}, ...acted && request.cast ? { cast: request.cast } : {} };
|
|
1320
|
-
return [{ beat: index, words: span.end - span.start, shot }];
|
|
1431
|
+
...acted && wider ? { framing: wider } : {}, ...acted && request.cast ? { cast: request.cast } : {}, ...acted ? holding : {} };
|
|
1432
|
+
return [{ beat: index, words: span.end - span.start, shot, demo: undefined }];
|
|
1321
1433
|
});
|
|
1322
1434
|
const kept = new Set([...wanted].sort((a, b) => b.words - a.words || a.beat - b.beat).slice(0, MAX_LIVE_SHOTS));
|
|
1435
|
+
/** Each demo clip's layer, with the last reference beat it shows. */
|
|
1436
|
+
const demos = new Map();
|
|
1323
1437
|
for (const entry of wanted) {
|
|
1324
1438
|
const { beat, shot } = entry;
|
|
1325
1439
|
if (!kept.has(entry)) {
|
|
@@ -1349,6 +1463,8 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1349
1463
|
moves.set(layer, { keys: ['transition'], added: [{ beat_index: beat,
|
|
1350
1464
|
what: `${lookName(look)} on the cuts into and out of the hook's live shot (beat ${beat + 1})` }] });
|
|
1351
1465
|
}
|
|
1466
|
+
if (entry.demo !== undefined)
|
|
1467
|
+
demos.set(layer, entry.demo);
|
|
1352
1468
|
layers.push(layer);
|
|
1353
1469
|
}
|
|
1354
1470
|
const soundsOn = longForm && !['warned', 'rejected', 'stored'].includes(executor?.field_dispositions.edit_sounds ?? '');
|
|
@@ -1389,10 +1505,11 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1389
1505
|
else if (pace.clamped) {
|
|
1390
1506
|
note(0, `narration pace ${pace.target_wps} words/s of the reference presenter (speed ${pace.wanted} wanted)`, `voice_pace ${pace.voice_pace}, the end of the speed range: the narration may run ${pace.wanted > pace.voice_pace ? 'slower' : 'faster'} than the reference`);
|
|
1391
1507
|
}
|
|
1392
|
-
// Speed first, then
|
|
1508
|
+
// Speed first, then pauses past the presenter's word-gap medians are cut; the request's own win, as a reference's gaps may be a song's (#1308).
|
|
1393
1509
|
// A remake is an ad: without the reference's own pauses it takes the ad-style default (#1136).
|
|
1394
|
-
const pauseTrim = pauseTrimFromVoice(profile.voice)
|
|
1395
|
-
|
|
1510
|
+
const pauseTrim = request.pause_trim === undefined ? pauseTrimFromVoice(profile.voice) : undefined;
|
|
1511
|
+
const pauseTargets = request.pause_trim ?? pauseTrim?.targets ?? { ...AD_PAUSE_TRIM };
|
|
1512
|
+
if (request.pause_trim === undefined && !pauseTrim?.targets)
|
|
1396
1513
|
note(0, 'narration pauses (the reference presenter\'s pauses were not measured)', `pause_trim ${AD_PAUSE_TRIM.sentence_end_s} s after a sentence and ${AD_PAUSE_TRIM.comma_s} s after a comma, the default for an ad`);
|
|
1397
1514
|
for (const { key, median_s } of pauseTrim?.capped ?? []) {
|
|
1398
1515
|
note(0, `narration pauses ${key} ${Math.round(median_s * 100) / 100} s of the reference presenter`, `pause_trim ${key} ${PAUSE_TRIM_CEILING_S}, the longest target: these pauses may run shorter than the reference`);
|
|
@@ -1433,10 +1550,11 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1433
1550
|
const field = (name) => { const items = layers.filter(layer => layer.field === name).map(layer => layer.item); return items.length ? { [name]: items } : {}; };
|
|
1434
1551
|
native = { script, actor_id: request.actor_id, ...(framing !== 'close' ? { presenter_framing: framing } : {}), ...(mic ? { presenter_mic: true } : {}),
|
|
1435
1552
|
...(request.voice ? { voice: request.voice } : {}), ...(request.voice_id ? { voice_id: request.voice_id } : {}),
|
|
1436
|
-
...(pace.kind === 'paced' && !fixedPace ? { voice_pace: pace.voice_pace } : {}),
|
|
1553
|
+
...(pace.kind === 'paced' && !fixedPace ? { voice_pace: pace.voice_pace } : {}), pause_trim: pauseTargets,
|
|
1437
1554
|
...(profile.captions.present ? { captions: true, caption_style: captionStyle, ...(captionsPlaced ? { caption_position: captionPosition } : {}) } : {}),
|
|
1438
1555
|
...field('caption_emphasis'), ...field('templates'), ...field('scenes'), ...field('overlays'), ...field('inserts'), ...field('layout_windows'), ...field('framing'),
|
|
1439
|
-
...(call ? { call } : {}), ...field('shots')
|
|
1556
|
+
...(call ? { call } : {}), ...field('shots'),
|
|
1557
|
+
...product && layers.some(layer => layer.field === 'shots' && layer.item.product) ? { product_asset_id: product.asset_id } : {} };
|
|
1440
1558
|
// Cut sounds only when the client asks: on a remake they sounded too loud on every cut (#1076).
|
|
1441
1559
|
if (request.edit_sounds === true && soundsOn && cutToSound())
|
|
1442
1560
|
native.edit_sounds = true;
|
|
@@ -1575,6 +1693,14 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1575
1693
|
}
|
|
1576
1694
|
break;
|
|
1577
1695
|
}
|
|
1696
|
+
if (product && !native.product_asset_id) {
|
|
1697
|
+
note(0, `your product ${product.asset_id} in the presenter's ${product.placement === 'hand' ? 'hand' : 'shots'}`, `not shown: no live shot acts on this plan ` +
|
|
1698
|
+
`(${!shotsOn ? 'live shots are not available here' : request.live_shots === false ? 'live_shots is false' : 'no beat of the reference acts, and no product.demo'})`);
|
|
1699
|
+
}
|
|
1700
|
+
else if (product) {
|
|
1701
|
+
note(0, `your product in every talking second`, 'only in the live shots: the usual take shows the actor as the actor view does; an actor view ' +
|
|
1702
|
+
'holding it (create_actor holding) shows it throughout');
|
|
1703
|
+
}
|
|
1578
1704
|
if (request.cast && !layers.some(layer => layer.field === 'shots' && layer.item.cast)) {
|
|
1579
1705
|
note(0, `your cast (${request.cast.map(person => person.role).join(', ')})`, 'not drawn: the plan has no acting live shot, where the reference presenter gestures or reacts');
|
|
1580
1706
|
}
|
|
@@ -1589,7 +1715,9 @@ export function compileReferenceRemake(input, capabilities, planSpans = proporti
|
|
|
1589
1715
|
...native.edit_sounds ? [`a sound on every cut, as you asked${motion.sounded.length ? `; the reference has a whoosh or a click on beats ${sounded}` : ''}`] : [],
|
|
1590
1716
|
...native.music ? [`music under the voice, as you asked${music >= 0 ? '; the reference has a music bed' : ''}`] : [],
|
|
1591
1717
|
...native.shots ? [`live shots of the presenter on beats ${beatsOf(layers.filter(layer => layer.field === 'shots').map(layer => layer.beat))}, as you asked; ` +
|
|
1592
|
-
'each shot kind bills its own presenter-second price'] : []
|
|
1718
|
+
'each shot kind bills its own presenter-second price'] : [],
|
|
1719
|
+
...[...demos].filter(([layer]) => layers.includes(layer)).map(([layer, last]) => `the demo on beats ${layer.beat + 1}${last > layer.beat ? `–${last + 1}` : ''}: ` +
|
|
1720
|
+
`one live shot of the presenter using your ${product.name}, from a first frame with it ${product.placement === 'hand' ? 'in hand' : 'beside them'}`)];
|
|
1593
1721
|
// Every place the compiler chose for an unpinned asset is named (#1170): the line its name matches, else its order in assets.
|
|
1594
1722
|
const shownBy = (asset) => layers.find(layer => JSON.stringify(layer.item).includes(`"${asset.asset_id}"`));
|
|
1595
1723
|
for (const { asset, beat } of guessed.filter(entry => entry.how === 'name' && shownBy(entry.asset))) {
|