@koda-sl/baker-cli 0.294.0-dev.97421c92b → 0.295.0-dev.f941e60fb

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.
@@ -2043,6 +2043,15 @@ function supportsParam(kind, model, param) {
2043
2043
  return MODEL_REGISTRY[kind]?.[model]?.params[param] !== void 0;
2044
2044
  }
2045
2045
  var DEFAULT_CLIP_DURATION_S = 5;
2046
+ var SPOKEN_WORDS_PER_SECOND = 2.5;
2047
+ function spokenWordsIn(prompt) {
2048
+ if (!prompt) return 0;
2049
+ const quoted = [
2050
+ ...prompt.matchAll(/['"\u201c\u201d\u2018\u2019]([^'"\u201c\u201d\u2018\u2019]{8,})['"\u201c\u201d\u2018\u2019]/g)
2051
+ ].map((m) => m[1] ?? "");
2052
+ const text = quoted.join(" ").trim();
2053
+ return text ? text.split(/\s+/).filter(Boolean).length : 0;
2054
+ }
2046
2055
  function nearestClipDuration(model, preferred) {
2047
2056
  const schema = MODEL_REGISTRY.video_generate[model]?.params.duration;
2048
2057
  const allowed = schema?.kind === "number" ? schema.enum : void 0;
@@ -9334,6 +9343,8 @@ export {
9334
9343
  MODEL_REGISTRY,
9335
9344
  supportsParam,
9336
9345
  DEFAULT_CLIP_DURATION_S,
9346
+ SPOKEN_WORDS_PER_SECOND,
9347
+ spokenWordsIn,
9337
9348
  nearestClipDuration,
9338
9349
  promptMaxLength,
9339
9350
  maxInputSlot,
@@ -9379,4 +9390,4 @@ export {
9379
9390
  defaultRegistry,
9380
9391
  createEngineFromEnv
9381
9392
  };
9382
- //# sourceMappingURL=chunk-LTXNRRXW.js.map
9393
+ //# sourceMappingURL=chunk-ER3KCAW3.js.map