@nodaro/cli 1.15.0 → 1.16.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/index.js CHANGED
@@ -29,7 +29,7 @@ var require_package = __commonJS({
29
29
  "package.json"(exports$1, module) {
30
30
  module.exports = {
31
31
  name: "@nodaro/cli",
32
- version: "1.15.0",
32
+ version: "1.16.0",
33
33
  description: "Command-line interface for Nodaro \u2014 list and run workflows, inspect jobs and executions, manage projects from the terminal.",
34
34
  type: "module",
35
35
  license: "Apache-2.0",
@@ -70,11 +70,11 @@ var require_package = __commonJS({
70
70
  "@inquirer/confirm": "^6.0.12",
71
71
  "@inquirer/input": "^5.0.12",
72
72
  "@inquirer/select": "^5.1.4",
73
- "@nodaro/sdk": "^1.23.0",
74
- "@nodaro/shared": "^2.13.0",
73
+ "@nodaro/sdk": "^1.24.0",
74
+ "@nodaro/shared": "^2.16.0",
75
75
  commander: "^12.1.0",
76
76
  picocolors: "^1.1.1",
77
- "@nodaro/prompts": "^1.9.0"
77
+ "@nodaro/prompts": "^1.11.0"
78
78
  },
79
79
  devDependencies: {
80
80
  tsup: "^8.5.0",
@@ -398,7 +398,7 @@ function saveWorkspace(profileName, workspaceId) {
398
398
  }
399
399
 
400
400
  // src/client.ts
401
- var CLI_VERSION = "1.15.0" ;
401
+ var CLI_VERSION = "1.16.0" ;
402
402
  function buildClient(profileName) {
403
403
  const { name, profile } = getProfile(profileName);
404
404
  if (!profile) {
@@ -2132,6 +2132,52 @@ Example:
2132
2132
  }
2133
2133
  }
2134
2134
  );
2135
+ cmd.command("dialogue").description('voice a multi-speaker script as one audio file (ElevenLabs Dialogue v3) \u2014 each --line is "Voice: text"').requiredOption(
2136
+ "--line <line>",
2137
+ 'one script line as "Voice: text" (e.g. "Rachel: Hello there") \u2014 repeat in speaking order; the voice is a premade name or an ElevenLabs voice UUID',
2138
+ (v, prev) => [...prev, v],
2139
+ []
2140
+ ).option("--stability <n>", "0 (most variable) | 0.5 (balanced) | 1 (most stable)", (v) => parseFloat(v)).option("--language <code>", 'ISO 639-1 language hint, e.g. "en" (auto-detected when omitted)').option("--seed <n>", "deterministic sampling seed (0-4294967295); omit for random", (v) => parseInt(v, 10)).option("--text-normalization <mode>", "spell out numbers/dates: auto | on | off").option("--watch", "poll until the job completes").option("--poll-interval <ms>", "watch poll interval in ms", (v) => parseInt(v, 10), 2e3).option("--profile <name>").option("--json").addHelpText("after", `
2141
+ Limits: 5,000 characters total (under 2,000 recommended), up to 10 unique voices.
2142
+ Line text may carry [audio tags] like [laughs].
2143
+
2144
+ Example:
2145
+ $ nodaro voice dialogue --line "Rachel: [excited] We did it!" --line "Daniel: I never doubted us." --watch`).action(
2146
+ async (opts) => {
2147
+ try {
2148
+ if (opts.line.length === 0) {
2149
+ throw new Error('at least one --line is required (e.g. --line "Rachel: Hello there")');
2150
+ }
2151
+ const dialogue = opts.line.map((raw) => {
2152
+ const idx = raw.indexOf(":");
2153
+ if (idx < 1 || idx === raw.length - 1) {
2154
+ throw new Error(`--line must be "Voice: text", got: ${raw}`);
2155
+ }
2156
+ return { voice: raw.slice(0, idx).trim(), text: raw.slice(idx + 1).trim() };
2157
+ });
2158
+ if (opts.stability !== void 0 && ![0, 0.5, 1].includes(opts.stability)) {
2159
+ throw new Error("--stability must be exactly 0, 0.5, or 1");
2160
+ }
2161
+ if (opts.textNormalization !== void 0 && !["auto", "on", "off"].includes(opts.textNormalization)) {
2162
+ throw new Error("--text-normalization must be auto, on, or off");
2163
+ }
2164
+ const client = buildClient(opts.profile);
2165
+ const result = await client.voices.textToDialogue({
2166
+ dialogue,
2167
+ ...opts.stability !== void 0 ? { stability: opts.stability } : {},
2168
+ ...opts.language ? { languageCode: opts.language } : {},
2169
+ ...opts.seed !== void 0 ? { seed: opts.seed } : {},
2170
+ ...opts.textNormalization ? { applyTextNormalization: opts.textNormalization } : {}
2171
+ });
2172
+ await reportQueuedJob(result, () => client.jobs.get(result.jobId), {
2173
+ ...opts,
2174
+ note: `dialogue (${dialogue.length} lines)`
2175
+ });
2176
+ } catch (err) {
2177
+ handleError(err);
2178
+ }
2179
+ }
2180
+ );
2135
2181
  cmd.command("list").description("list the premade voices you can pass to --voice / --voices (or your voice clones with --clones)").option("--clones", "list your voice clones instead of the premade catalog").option("--profile <name>").option("--json").action(async (opts) => {
2136
2182
  try {
2137
2183
  const client = buildClient(opts.profile);