@nodaro/cli 1.15.0 → 1.17.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.17.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.25.0",
74
+ "@nodaro/shared": "^2.17.0",
75
75
  commander: "^12.1.0",
76
76
  picocolors: "^1.1.1",
77
- "@nodaro/prompts": "^1.9.0"
77
+ "@nodaro/prompts": "^1.12.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.17.0" ;
402
402
  function buildClient(profileName) {
403
403
  const { name, profile } = getProfile(profileName);
404
404
  if (!profile) {
@@ -1893,7 +1893,10 @@ Examples:
1893
1893
  "comma-separated voices in speaker order \u2014 each entry is a premade name (Rachel), an ElevenLabs clone UUID, or the literal `keep` to keep that speaker's original voice"
1894
1894
  ).option(
1895
1895
  "--voices-json <json>",
1896
- `JSON array for per-voice settings \u2014 entries are a voice id string, a {"voiceId","stability","similarityBoost","style","useSpeakerBoost","seed","volumeMode","volume"} object, or null to keep that speaker's original voice`
1896
+ `JSON array for per-voice settings \u2014 entries are a voice id string, a {"voiceId","engine","stability","similarityBoost","style","useSpeakerBoost","seed","volumeMode","volume"} object, or null to keep that speaker's original voice`
1897
+ ).option(
1898
+ "--v3 <indexes>",
1899
+ "comma-separated 1-based speaker indexes converted with the Re-speak (eleven_v3) engine instead of the recast \u2014 the performance is regenerated from the transcript ([audio tags] supported; delivery replaced; lips won't match on video). With --analysis-file the analysis text is the script; without one the engine re-speaks from its own transcription"
1897
1900
  ).option("--model <id>", "speech-to-speech model override").option("--output <mode>", "output mode: video (default \u2014 merged, rendered result) or stems (dry per-track stems for an interactive mix; render later with `voice export`)").option("--analysis-json <json>", "a completed `voice analyze` job's output_data, inline \u2014 skips re-detection (the interactive-flow fast-path)").option("--analysis-file <path>", "same as --analysis-json but read from a JSON file").option("--no-preserve-background", "drop the separated music/SFX bed for a clean voice-only result (kept by default)").option("--separation-quality <q>", "voice/music separation quality: fast (default) or best").option("--music-volume-mode <mode>", "preserved background level: match (default), normalize, or manual").option("--music-volume <n>", "background level % (0-200) when --music-volume-mode is manual", parseFloat).option("--remove-background-noise", "denoise for a cleaner voice-only result").option("--voice-fx <preset>", `reverb/echo on the combined recast voices: ${FX_PRESETS}`).option("--voice-fx-mix <n>", "reverb wet/dry mix % (0-100) \u2014 reverb presets", parseFloat).option("--voice-fx-delay <ms>", "echo delay in ms (20-2000) \u2014 echo/custom presets", (v) => parseInt(v, 10)).option("--voice-fx-decay <n>", "echo decay (0-1) \u2014 echo/custom presets", parseFloat).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", `
1898
1901
  Examples:
1899
1902
  $ nodaro voice recast --audio https://.../podcast.mp3 --voices Rachel,Aria --watch
@@ -1948,6 +1951,21 @@ Examples:
1948
1951
  warn("At least one speaker must get a new voice \u2014 `keep` only marks speakers whose original voice stays");
1949
1952
  process.exit(1);
1950
1953
  }
1954
+ if (opts.v3) {
1955
+ const idxs = opts.v3.split(",").map((s) => parseInt(s.trim(), 10));
1956
+ if (idxs.some((n) => !Number.isInteger(n) || n < 1 || n > orderedVoices.length)) {
1957
+ warn(`--v3 indexes must be 1..${orderedVoices.length} (matching --voices positions)`);
1958
+ process.exit(1);
1959
+ }
1960
+ for (const n of idxs) {
1961
+ const v = orderedVoices[n - 1];
1962
+ if (v === null) {
1963
+ warn(`--v3 index ${n} is a keep-slot \u2014 a kept speaker is not converted at all`);
1964
+ process.exit(1);
1965
+ }
1966
+ orderedVoices[n - 1] = typeof v === "string" ? { voiceId: v, engine: "v3" } : { ...v, engine: "v3" };
1967
+ }
1968
+ }
1951
1969
  const voiceFx = buildVoiceFx(opts);
1952
1970
  const analysisRaw = readJsonFlag(opts.analysisJson, opts.analysisFile, "analysis");
1953
1971
  let analysis;
@@ -2109,19 +2127,35 @@ Example:
2109
2127
  }
2110
2128
  }
2111
2129
  );
2112
- cmd.command("dub").description("dub an audio clip into another language while preserving each speaker's voice").requiredOption("--audio <url>", "audio URL to dub").requiredOption("--target-language <code>", 'target language ISO code, e.g. "es", "fr", "pt-BR"').option("--source-language <code>", "source language ISO code (auto-detected when omitted)").option("--num-speakers <n>", "expected number of speakers (1-20) \u2014 improves separation when known", (v) => parseInt(v, 10)).option("--disable-voice-cloning", "keep the original voices instead of cloning them into the target language").option("--drop-background-audio", "drop the background/music bed from the dubbed output").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", `
2113
- Example:
2114
- $ nodaro voice dub --audio https://.../interview.mp3 --target-language es --num-speakers 2 --watch`).action(
2130
+ cmd.command("dub").description("dub audio OR video into another language while preserving each speaker's voice (video in -> dubbed video out)").option("--audio <url>", "audio URL to dub").option("--video <url>", "video URL to dub \u2014 the result is the dubbed VIDEO (+ dubbed audio track)").option("--source-url <url>", "public YouTube/TikTok/direct link \u2014 ElevenLabs fetches it directly").requiredOption("--target-language <code>", 'target language ISO code, e.g. "es", "fr", "pt-BR"').option("--source-language <code>", "source language ISO code (auto-detected when omitted)").option("--num-speakers <n>", "expected number of speakers (1-20; 0 = auto) \u2014 improves separation when known", (v) => parseInt(v, 10)).option("--disable-voice-cloning", "keep the original voices instead of cloning them into the target language").option("--drop-background-audio", "drop the background/music bed from the dubbed output").option("--start-time <sec>", "dub only from this second of the source", (v) => parseFloat(v)).option("--end-time <sec>", "dub only up to this second of the source", (v) => parseFloat(v)).option("--highest-resolution", "keep the source resolution on video dubs (slower render)").option("--profanity-filter", "apply ElevenLabs' profanity filter to the dubbed speech").option("--target-accent <accent>", "experimental: steer dubbed voices toward an accent").option("--el-watermark", "apply ElevenLabs' own watermark to video dubs").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", `
2131
+ Priced per minute of the dubbed span; max 30 minutes \u2014 use --start-time/--end-time for longer sources.
2132
+
2133
+ Examples:
2134
+ $ nodaro voice dub --audio https://.../interview.mp3 --target-language es --num-speakers 2 --watch
2135
+ $ nodaro voice dub --video https://.../talk.mp4 --target-language fr --highest-resolution --watch
2136
+ $ nodaro voice dub --source-url https://youtube.com/watch?v=... --target-language he --watch`).action(
2115
2137
  async (opts) => {
2116
2138
  try {
2139
+ const sources = [opts.audio, opts.video, opts.sourceUrl].filter(Boolean);
2140
+ if (sources.length !== 1) {
2141
+ throw new Error("provide exactly one source: --audio, --video, or --source-url");
2142
+ }
2117
2143
  const client = buildClient(opts.profile);
2118
2144
  const result = await client.voices.dub({
2119
- audioUrl: opts.audio,
2145
+ ...opts.audio ? { audioUrl: opts.audio } : {},
2146
+ ...opts.video ? { videoUrl: opts.video } : {},
2147
+ ...opts.sourceUrl ? { sourceUrl: opts.sourceUrl } : {},
2120
2148
  targetLanguage: opts.targetLanguage,
2121
2149
  ...opts.sourceLanguage ? { sourceLanguage: opts.sourceLanguage } : {},
2122
2150
  ...opts.numSpeakers !== void 0 ? { numSpeakers: opts.numSpeakers } : {},
2123
2151
  ...opts.disableVoiceCloning ? { disableVoiceCloning: true } : {},
2124
- ...opts.dropBackgroundAudio ? { dropBackgroundAudio: true } : {}
2152
+ ...opts.dropBackgroundAudio ? { dropBackgroundAudio: true } : {},
2153
+ ...opts.startTime !== void 0 ? { startTime: opts.startTime } : {},
2154
+ ...opts.endTime !== void 0 ? { endTime: opts.endTime } : {},
2155
+ ...opts.highestResolution ? { highestResolution: true } : {},
2156
+ ...opts.profanityFilter ? { useProfanityFilter: true } : {},
2157
+ ...opts.targetAccent ? { targetAccent: opts.targetAccent } : {},
2158
+ ...opts.elWatermark ? { watermark: true } : {}
2125
2159
  });
2126
2160
  await reportQueuedJob(result, () => client.jobs.get(result.jobId), {
2127
2161
  ...opts,
@@ -2132,6 +2166,52 @@ Example:
2132
2166
  }
2133
2167
  }
2134
2168
  );
2169
+ cmd.command("dialogue").description('voice a multi-speaker script as one audio file (ElevenLabs Dialogue v3) \u2014 each --line is "Voice: text"').requiredOption(
2170
+ "--line <line>",
2171
+ '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',
2172
+ (v, prev) => [...prev, v],
2173
+ []
2174
+ ).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", `
2175
+ Limits: 5,000 characters total (under 2,000 recommended), up to 10 unique voices.
2176
+ Line text may carry [audio tags] like [laughs].
2177
+
2178
+ Example:
2179
+ $ nodaro voice dialogue --line "Rachel: [excited] We did it!" --line "Daniel: I never doubted us." --watch`).action(
2180
+ async (opts) => {
2181
+ try {
2182
+ if (opts.line.length === 0) {
2183
+ throw new Error('at least one --line is required (e.g. --line "Rachel: Hello there")');
2184
+ }
2185
+ const dialogue = opts.line.map((raw) => {
2186
+ const idx = raw.indexOf(":");
2187
+ if (idx < 1 || idx === raw.length - 1) {
2188
+ throw new Error(`--line must be "Voice: text", got: ${raw}`);
2189
+ }
2190
+ return { voice: raw.slice(0, idx).trim(), text: raw.slice(idx + 1).trim() };
2191
+ });
2192
+ if (opts.stability !== void 0 && ![0, 0.5, 1].includes(opts.stability)) {
2193
+ throw new Error("--stability must be exactly 0, 0.5, or 1");
2194
+ }
2195
+ if (opts.textNormalization !== void 0 && !["auto", "on", "off"].includes(opts.textNormalization)) {
2196
+ throw new Error("--text-normalization must be auto, on, or off");
2197
+ }
2198
+ const client = buildClient(opts.profile);
2199
+ const result = await client.voices.textToDialogue({
2200
+ dialogue,
2201
+ ...opts.stability !== void 0 ? { stability: opts.stability } : {},
2202
+ ...opts.language ? { languageCode: opts.language } : {},
2203
+ ...opts.seed !== void 0 ? { seed: opts.seed } : {},
2204
+ ...opts.textNormalization ? { applyTextNormalization: opts.textNormalization } : {}
2205
+ });
2206
+ await reportQueuedJob(result, () => client.jobs.get(result.jobId), {
2207
+ ...opts,
2208
+ note: `dialogue (${dialogue.length} lines)`
2209
+ });
2210
+ } catch (err) {
2211
+ handleError(err);
2212
+ }
2213
+ }
2214
+ );
2135
2215
  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
2216
  try {
2137
2217
  const client = buildClient(opts.profile);