@koda-sl/baker-cli 0.276.0-dev.1f1c09c80 → 0.277.0-dev.1f1c09c80

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/cli.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  ulid,
59
59
  validateCanvasDeep,
60
60
  ytDlpBlockSignal
61
- } from "./chunk-4IJX4R4J.js";
61
+ } from "./chunk-AUOSDGWY.js";
62
62
  import {
63
63
  csvOrJson,
64
64
  daysAgoIso,
@@ -3699,14 +3699,22 @@ var avatarSummarySchema = z7.object({
3699
3699
  subjectDescription: z7.string(),
3700
3700
  /** The identity sheet to wire into `--reference`. Absent until the build settles. */
3701
3701
  sheetUrl: z7.string().optional(),
3702
+ /**
3703
+ * The avatar's pinned voice.
3704
+ *
3705
+ * A casting essential, not a profile detail: an avatar is a face AND a voice, and
3706
+ * casting the face without it is what makes a presenter speak in somebody else's.
3707
+ * It lived only behind `--full`, so an ad that grounded every frame on the identity
3708
+ * sheet still had its lines read by a voice cast from a prose description.
3709
+ */
3710
+ voiceId: z7.string().optional(),
3711
+ voiceDescription: z7.string().optional(),
3702
3712
  coverUrl: z7.string().optional(),
3703
3713
  errorMessage: z7.string().optional()
3704
3714
  });
3705
3715
  var avatarDetailSchema = avatarSummarySchema.extend({
3706
3716
  profile: avatarProfileSchema,
3707
3717
  sourceUrls: z7.array(z7.string()),
3708
- voiceId: z7.string().optional(),
3709
- voiceDescription: z7.string().optional(),
3710
3718
  createdAt: z7.number()
3711
3719
  });
3712
3720
  var avatarsListRequestSchema = z7.object({
@@ -28705,7 +28713,7 @@ function buildPhrases(blueprint, canonical2, compositeScenes, presenterPresent,
28705
28713
  flush();
28706
28714
  return phrases;
28707
28715
  }
28708
- function makeVoiceFactory(blueprint, canonical2, nodes, voiceLanguage) {
28716
+ function makeVoiceFactory(blueprint, canonical2, nodes, voiceLanguage, pinnedVoiceId) {
28709
28717
  const bySpeaker = /* @__PURE__ */ new Map();
28710
28718
  const describe = (speaker) => {
28711
28719
  for (const scene of blueprint.scenes)
@@ -28721,7 +28729,9 @@ function makeVoiceFactory(blueprint, canonical2, nodes, voiceLanguage) {
28721
28729
  const description = describe(speaker);
28722
28730
  const traits = parseVoiceTraits(description);
28723
28731
  if (voiceLanguage) traits.language = voiceLanguage;
28724
- nodes.push({ id, type: "voice_select", params: { description, ...traits } });
28732
+ nodes.push(
28733
+ pinnedVoiceId ? { id, type: "voice_select", params: { description, voice_id: pinnedVoiceId, ...traits } } : { id, type: "voice_select", params: { description, ...traits } }
28734
+ );
28725
28735
  bySpeaker.set(speaker, id);
28726
28736
  return id;
28727
28737
  };
@@ -29122,7 +29132,7 @@ function buildTimeline(blueprint, slots, opts, nodes) {
29122
29132
  });
29123
29133
  }
29124
29134
  const canonical2 = collapseVoiceover(blueprint);
29125
- const ensureVoiceNode = makeVoiceFactory(blueprint, canonical2, nodes, opts.voiceLanguage);
29135
+ const ensureVoiceNode = makeVoiceFactory(blueprint, canonical2, nodes, opts.voiceLanguage, opts.voiceId);
29126
29136
  const aspect = resolveAspect(blueprint.source?.aspect_ratio, opts.aspect, genAspectsFor(opts.videoModel));
29127
29137
  const env = {
29128
29138
  blueprint,
@@ -32775,7 +32785,8 @@ function adSpecCastElements(spec, avatar) {
32775
32785
  function motionPrompt(beat, isClosingCard, place, physics) {
32776
32786
  if (isClosingCard) return BRAND_PLATE;
32777
32787
  const shot = `${beat.show}${place}${physics}`;
32778
- return beat.on_camera ? shot : `${shot} Nobody in frame is speaking \u2014 mouths closed, no dialogue.`;
32788
+ if (beat.on_camera) return shot;
32789
+ return `${shot} Nobody in frame is speaking: mouths CLOSED and STILL throughout, no talking, no lip movement. Whoever is in shot is looking, reacting or working \u2014 never addressing the camera.`;
32779
32790
  }
32780
32791
  function staticTranscript(spec) {
32781
32792
  const out = [];
@@ -33219,6 +33230,10 @@ var scaffoldAdCommand = defineCommand104({
33219
33230
  // Told, not guessed: the voice description is written in the ad's own language
33220
33231
  // and the engine's trait parser reads English only.
33221
33232
  voiceLanguage: voiceLanguageFor(spec.data),
33233
+ // The cast avatar's own voice. An avatar is a face AND a voice; grounding every
33234
+ // frame on their identity sheet while a separately cast voice reads the lines is
33235
+ // how a presenter ends up speaking in somebody else's.
33236
+ ...avatar?.voiceId ? { voiceId: avatar.voiceId } : {},
33222
33237
  ...spec.data.voiceover === false ? { staticTranscriptPath: path24.relative(outDir, transcriptPath) } : {}
33223
33238
  };
33224
33239
  const canvas = scaffoldVideoCanvas(blueprint, adSpecCastElements(spec.data, avatar), opts);
@@ -33272,6 +33287,9 @@ var scaffoldAdCommand = defineCommand104({
33272
33287
  ] : [],
33273
33288
  ...avatarError ? [avatarError] : [],
33274
33289
  ...avatar ? [
33290
+ ...avatar?.voiceId ? [] : [
33291
+ `Avatar \`${handle}\` has no pinned voice, so the ad's lines are read by a voice cast from a description \u2014 it will not sound like them. Give them one (\`baker avatars\` voice) before this ships.`
33292
+ ],
33275
33293
  `Every beat the customer appears in is grounded on \`${handle}\`'s identity sheet, and their subject description was copied into the frames verbatim \u2014 so it is the same face throughout and the same face as the rest of this company's work.`
33276
33294
  ] : [],
33277
33295
  ...presenterIsInEveryShot(spec.data) ? [