makefx 0.2.6 → 0.2.7

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/makefx.mjs +24 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -176,4 +176,4 @@ Run `makefx --help` or `makefx help <command>` for command-specific options.
176
176
  - Media generation guide: https://makefx.app/docs/media-playbooks
177
177
  - Source: https://github.com/krasnoperov/inventory
178
178
 
179
- Version: 0.2.6
179
+ Version: 0.2.7
package/makefx.mjs CHANGED
@@ -23222,6 +23222,7 @@ async function prepareAudioParsedArgs(parsed, mode) {
23222
23222
  const positionals = [...parsed.positionals];
23223
23223
  const effectiveMode = mode ?? getAudioModeFromType(options.type);
23224
23224
  validateAudioProviderOption(options.provider, effectiveMode);
23225
+ validateAudioModelOption(options.model, effectiveMode);
23225
23226
  if (mode) options.type = getMediaOperationEntry(mode).assetType;
23226
23227
  validateAudioVoiceOptions(options);
23227
23228
  if (options.input) {
@@ -23253,6 +23254,7 @@ async function executeGenerate(parsed, ctx, client, deps, mediaKind, followOptio
23253
23254
  mediaKind
23254
23255
  });
23255
23256
  const imageOptions = parseImageGenerationOptions(parsed, mediaKind);
23257
+ const audioModelOptions = parseAudioGenerationOptions(parsed, mediaKind);
23256
23258
  const videoAudioOptions = parseVideoAudioOptions(parsed, mediaKind);
23257
23259
  const videoOptions = parseVideoGenerationOptions(parsed, mediaKind);
23258
23260
  const styleSelection = await resolveStyleSelection(parsed, ctx, deps);
@@ -23262,7 +23264,7 @@ async function executeGenerate(parsed, ctx, client, deps, mediaKind, followOptio
23262
23264
  mediaKind,
23263
23265
  prompt,
23264
23266
  count: 1,
23265
- model: imageOptions.model,
23267
+ model: imageOptions.model ?? audioModelOptions.model,
23266
23268
  imageSize: imageOptions.imageSize,
23267
23269
  ...musicProvider ? { musicProvider } : {},
23268
23270
  ...videoAudioOptions,
@@ -23276,6 +23278,7 @@ async function executeGenerate(parsed, ctx, client, deps, mediaKind, followOptio
23276
23278
  assetType,
23277
23279
  prompt,
23278
23280
  ...imageOptions,
23281
+ ...audioModelOptions,
23279
23282
  aspectRatio: imageOptions.aspectRatio ?? videoOptions.aspectRatio,
23280
23283
  disableStyle: parsed.options["no-style"] === "true",
23281
23284
  ...styleSelection.stylePresetId ? { stylePresetId: styleSelection.stylePresetId } : {},
@@ -23321,6 +23324,10 @@ function validateAudioProviderOption(value, mode) {
23321
23324
  if (mode !== "music") throw new Error("--provider is only supported for audio music");
23322
23325
  if (value !== "elevenlabs" && value !== "lyria") throw new Error("--provider must be elevenlabs or lyria");
23323
23326
  }
23327
+ function validateAudioModelOption(value, mode) {
23328
+ if (!value) return;
23329
+ if (mode !== "speech" && mode !== "dialogue") throw new Error("--model is only supported for speech and dialogue audio");
23330
+ }
23324
23331
  function parseMusicProviderOption(parsed, mediaKind, assetType) {
23325
23332
  const value = parsed.options.provider;
23326
23333
  if (!value) return void 0;
@@ -23631,6 +23638,7 @@ async function executeBatch(parsed, ctx, client, deps, mediaKind, saveBatchManif
23631
23638
  const mode = parseBatchMode(parsed.options.mode || "explore");
23632
23639
  const refs = parsed.options.refs ? parseRefs(parsed.options.refs) : [];
23633
23640
  const imageOptions = parseImageGenerationOptions(parsed, mediaKind);
23641
+ const audioModelOptions = parseAudioGenerationOptions(parsed, mediaKind);
23634
23642
  if (mediaKind === "image") validateImageReferenceCount(imageOptions.model, refs.length);
23635
23643
  const state = await requestSpaceState(client);
23636
23644
  const referenceVariantIds = refs.length > 0 ? await resolveReferenceVariantIds(refs, ctx, deps, state.variants, mediaKind) : void 0;
@@ -23643,7 +23651,7 @@ async function executeBatch(parsed, ctx, client, deps, mediaKind, saveBatchManif
23643
23651
  mediaKind,
23644
23652
  prompt,
23645
23653
  count,
23646
- model: imageOptions.model,
23654
+ model: imageOptions.model ?? audioModelOptions.model,
23647
23655
  imageSize: imageOptions.imageSize,
23648
23656
  ...musicProvider ? { musicProvider } : {}
23649
23657
  });
@@ -23659,6 +23667,7 @@ async function executeBatch(parsed, ctx, client, deps, mediaKind, saveBatchManif
23659
23667
  mode,
23660
23668
  referenceVariantIds,
23661
23669
  ...imageOptions,
23670
+ ...audioModelOptions,
23662
23671
  aspectRatio: imageOptions.aspectRatio,
23663
23672
  disableStyle: parsed.options["no-style"] === "true",
23664
23673
  ...styleSelection.stylePresetId ? { stylePresetId: styleSelection.stylePresetId } : {},
@@ -24112,6 +24121,11 @@ function normalizeCliOption(value) {
24112
24121
  if (value === void 0 || value === "true") return void 0;
24113
24122
  return value.trim() || void 0;
24114
24123
  }
24124
+ function parseAudioGenerationOptions(parsed, mediaKind) {
24125
+ if (mediaKind !== "audio") return {};
24126
+ const model = normalizeCliOption(readOptionalOption(parsed, "model", "model"));
24127
+ return model ? { model } : {};
24128
+ }
24115
24129
  function parseImageGenerationOptions(parsed, mediaKind) {
24116
24130
  if (mediaKind !== "image") return {};
24117
24131
  const model = parseImageModelOption(readOptionalOption(parsed, "model", "model"));
@@ -26552,7 +26566,7 @@ Options:
26552
26566
  }
26553
26567
  //#endregion
26554
26568
  //#region src/cli/index.ts
26555
- var CLI_VERSION = "0.2.6+be63b9dd565a";
26569
+ var CLI_VERSION = "0.2.7+1943b2e5248a";
26556
26570
  async function main() {
26557
26571
  const argv = process$1.argv.slice(2);
26558
26572
  if (argv[0] === "--") argv.shift();
@@ -27037,6 +27051,7 @@ Usage:
27037
27051
  makefx audio ${first} generate --follow <variant_id> -o <file> [--space <id>]
27038
27052
  ${first === "music" ? " makefx audio music generate \"prompt\" --provider lyria --name <name> -o <file> [--space <id>]\n" : ""}
27039
27053
  ${first === "music" ? "Provider selection:\n --provider <elevenlabs|lyria> Music provider (default: server default)\n" : ""}
27054
+ ${first === "speech" || first === "dialogue" ? "Model selection:\n --model <model_id> ElevenLabs model (default: eleven_v3)\n" : ""}
27040
27055
  ${first === "speech" || first === "dialogue" ? "Voice selection:\n --voice <voice_id> Speech voice, or dialogue fallback voice\n --dialogue-voices <id,id,...> Dialogue voices ordered by first speaker appearance\n" : ""}
27041
27056
  `);
27042
27057
  return;
@@ -27047,6 +27062,8 @@ Usage:
27047
27062
  makefx audio ${first} batch "prompt" --name <name> --count <2-8> --output-dir <dir> [--space <id>]
27048
27063
  ${first === "music" ? " makefx audio music batch \"prompt\" --provider lyria --name <name> --count <2-8> --output-dir <dir> [--space <id>]\n" : ""}
27049
27064
  ${first === "music" ? "Provider selection:\n --provider <elevenlabs|lyria> Music provider (default: server default)\n" : ""}
27065
+ ${first === "speech" || first === "dialogue" ? "Model selection:\n --model <model_id> ElevenLabs model (default: eleven_v3)\n" : ""}
27066
+ ${first === "speech" || first === "dialogue" ? "Voice selection:\n --voice <voice_id> Speech voice, or dialogue fallback voice\n --dialogue-voices <id,id,...> Dialogue voices ordered by first speaker appearance\n" : ""}
27050
27067
  `);
27051
27068
  return;
27052
27069
  }
@@ -27055,6 +27072,7 @@ Usage:
27055
27072
  makefx audio ${first} generate "prompt" --name <name> -o <file> [--space <id>]
27056
27073
  makefx audio ${first} batch "prompt" --name <name> --count <2-8> --output-dir <dir> [--space <id>]
27057
27074
  ${first === "music" ? "\nProvider selection:\n --provider <elevenlabs|lyria> Music provider (default: server default)\n" : ""}
27075
+ ${first === "speech" || first === "dialogue" ? "\nModel selection:\n --model <model_id> ElevenLabs model (default: eleven_v3)\n" : ""}
27058
27076
  ${first === "speech" || first === "dialogue" ? "\nVoice selection:\n --voice <voice_id> Speech voice, or dialogue fallback voice\n --dialogue-voices <id,id,...> Dialogue voices ordered by first speaker appearance\n" : ""}
27059
27077
  `);
27060
27078
  return;
@@ -27098,6 +27116,9 @@ Voice selection:
27098
27116
  --voice <voice_id> Speech voice, or dialogue fallback voice
27099
27117
  --dialogue-voices <id,id,...> Dialogue voices ordered by first speaker appearance
27100
27118
 
27119
+ Model selection:
27120
+ --model <model_id> ElevenLabs speech/dialogue model (default: eleven_v3)
27121
+
27101
27122
  Low-level compatibility:
27102
27123
  makefx audio generate "prompt" --name <name> --type <type> -o <file> [--space <id>]
27103
27124
  makefx audio batch "prompt" --name <name> --type <type> --count <2-8> --output-dir <dir> [--space <id>]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makefx",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Command-line interface for AI-assisted game asset production with Make Effects.",
5
5
  "license": "MIT",
6
6
  "type": "module",