@koda-sl/baker-cli 0.353.0-dev.56f955de4 → 0.353.0-dev.5d1d795f9

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/README.md CHANGED
@@ -615,7 +615,7 @@ baker ads google keywords update <criterion-id> --customer-id 1234567890 --clear
615
615
  baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> \
616
616
  --headlines "Fast Widgets,Buy Online,Free Shipping" --descriptions "Best widgets around.,Ships tomorrow." \
617
617
  --final-url https://example.com
618
- # Copy with commas in it — repeat the flag once per item (or quote the item: '"Fast, free quotes",Book today', or escape its comma: 'Fast\, free quotes,Book today')
618
+ # Copy with commas in it — repeat the flag once per item (or quote the item: '"Fast, free quotes",Book today')
619
619
  baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> \
620
620
  --headlines "Fast Widgets,Buy Online,Free Shipping" \
621
621
  --descriptions "Calls, messages and bookings in one place." --descriptions "Ships tomorrow, free." \
@@ -5057,8 +5057,11 @@ Cast an ElevenLabs voice from a natural-language description (e.g. a blueprint's
5057
5057
  |---|---|---|---|
5058
5058
  | `description` | string | yes | the casting brief |
5059
5059
  | `gender` / `age` / `accent` / `language` | string | no | structured hints that sharpen the ranking |
5060
+ | `voice_id` | string | no | a voice already chosen — skips the ranking and emits it as-is |
5060
5061
  | `limit` | number | no | how many `candidates` to return (default 5) |
5061
5062
 
5063
+ `language` is strict: when no voice on the account speaks it, the node fails (`voice_language_unavailable`) before anything downstream is voiced. `gender` is strict within that language unless nobody there has it — then it is dropped and `baker canvas run` prints a `[warn]` naming the voice cast instead.
5064
+
5062
5065
  **Outputs** — `voice_id` (text, bare id) + `candidates` (json, ranked shortlist). Wire `voice_id` into a `tts` node: set `inputs.voice_ref: $ref:<this>.voice_id` and `params.voice: "{{voice_ref}}"` — the engine splices the id in at run time.
5063
5066
 
5064
5067
  **Cost** — free (voice listing). Generation is billed under `tts`/`dialogue`.
@@ -5191,6 +5191,7 @@ var Engine = class {
5191
5191
  outputs[node.id] = hit.outputs;
5192
5192
  await this.materializeNodeOutputs(node.id, hit.outputs, writer);
5193
5193
  this.log(`[exec ] ${node.id.padEnd(20)} ${node.type.padEnd(20)} cached`);
5194
+ this.logOutputWarnings(node.id, hit.outputs);
5194
5195
  return { cached: true, credits: 0, durationMs: Date.now() - cacheT0 };
5195
5196
  }
5196
5197
  }
@@ -5233,8 +5234,18 @@ var Engine = class {
5233
5234
  }
5234
5235
  await this.materializeNodeOutputs(node.id, outputsObj, writer);
5235
5236
  this.log(`[exec ] ${node.id.padEnd(20)} ${node.type.padEnd(20)} fresh (${(elapsed / 1e3).toFixed(1)}s)`);
5237
+ this.logOutputWarnings(node.id, outputsObj);
5236
5238
  return { cached: false, credits, durationMs: elapsed };
5237
5239
  }
5240
+ /**
5241
+ * Print the warnings a node left on its outputs' metadata — a `voice_select` that
5242
+ * could not honor the requested gender, say. Left in the metadata alone they were
5243
+ * read only after the render was paid for and somebody listened. Printed on a
5244
+ * cached replay too: the output still carries the compromise.
5245
+ */
5246
+ logOutputWarnings(nodeId, outputs) {
5247
+ for (const warning of outputWarnings(outputs)) this.log(`[warn ] ${nodeId}: ${warning}`);
5248
+ }
5238
5249
  async materializeNodeOutputs(nodeId, outputs, writer) {
5239
5250
  for (const [name, value] of Object.entries(outputs)) {
5240
5251
  if (isAssetRef(value)) {
@@ -5279,6 +5290,16 @@ var Engine = class {
5279
5290
  return await fix(inputs);
5280
5291
  }
5281
5292
  };
5293
+ function refWarnings(ref) {
5294
+ if (!isAssetRef(ref)) return [];
5295
+ const warnings = ref.metadata?.warnings;
5296
+ if (!Array.isArray(warnings)) return [];
5297
+ return warnings.filter((w) => typeof w === "string" && w.length > 0);
5298
+ }
5299
+ function outputWarnings(outputs) {
5300
+ const refs = Object.values(outputs).flatMap((value) => Array.isArray(value) ? value : [value]);
5301
+ return [...new Set(refs.flatMap(refWarnings))];
5302
+ }
5282
5303
  function resolveRegenerateToken(node, forced, runId) {
5283
5304
  if (forced?.has(node.id)) return `run:${runId}`;
5284
5305
  if (node.regenerate !== void 0) return `node:${String(node.regenerate)}`;
@@ -9563,10 +9584,14 @@ var voiceSelectNode = delegated({
9563
9584
  // to move with it: the cache key is built from this string, so entries written under
9564
9585
  // 1.0.0 kept replaying the broken shape long after the fix was deployed. A node whose
9565
9586
  // OUTPUT shape changes has to bump, not only one whose behaviour does.
9566
- version: "1.1.0",
9587
+ // 1.2.0: `language` is a hard constraint — a language no voice on the account speaks
9588
+ // fails the node instead of casting a voice of another language, and a gender nobody
9589
+ // in the language has is relaxed with a printed warning. Bumped so a 1.1.0 cache entry
9590
+ // holding a wrong-language cast stops replaying.
9591
+ version: "1.2.0",
9567
9592
  category: "audio",
9568
9593
  summary: 'Cast an ElevenLabs voice from a natural-language description (e.g. "warm, authoritative female narrator, American accent"). Lists the account\'s voices and ranks them against the brief, emitting the best `voice_id` as a bare-string text asset plus a ranked `candidates` JSON.',
9569
- when_to_use: 'Use to turn a voice description (e.g. from a `video_deconstruct` blueprint\'s `voice_description`) into a usable ElevenLabs voice id, then feed it into a `tts` node by wiring `inputs.voice_ref: $ref:<this>.voice_id` and setting `params.voice: "{{voice_ref}}"` \u2014 the engine splices the id in at run time. Review `candidates` (json) to pick a different voice. Optional `gender`/`age`/`accent`/`language` hints sharpen the ranking.',
9594
+ when_to_use: 'Use to turn a voice description (e.g. from a `video_deconstruct` blueprint\'s `voice_description`) into a usable ElevenLabs voice id, then feed it into a `tts` node by wiring `inputs.voice_ref: $ref:<this>.voice_id` and setting `params.voice: "{{voice_ref}}"` \u2014 the engine splices the id in at run time. Review `candidates` (json) to pick a different voice. Optional `gender`/`age`/`accent`/`language` hints sharpen the ranking. `language` is strict: when no voice on the account speaks it the node fails before anything is voiced (add a voice in that language, or pass its `voice_id`). A `gender` nobody in that language has is dropped and `baker canvas run` prints a `[warn]` naming the voice cast instead.',
9570
9595
  inputs: z34.object({}).loose(),
9571
9596
  params: z34.object({
9572
9597
  description: z34.string().min(1),
@@ -9878,4 +9903,4 @@ export {
9878
9903
  defaultRegistry,
9879
9904
  createEngineFromEnv
9880
9905
  };
9881
- //# sourceMappingURL=chunk-B7MLH3K6.js.map
9906
+ //# sourceMappingURL=chunk-PHHQLFY3.js.map